I am working on web site which is going to use a lot of nodequeues and the nodequeue creation will be very common operation. It also important to mention that the views module is enabled, too. Unfortunately I noticed the nodequeue_save function become pretty slow when the site has a lot of content.
The bottleneck is calling of views_invalidate_cache function which comes from views module and delete a menu, page and block cache together with the views cache.
I think that the only cache that should be deleted in this particular case is the views cache.
Opinions?
Comment | File | Size | Author |
---|---|---|---|
#5 | 2037033-slow-creation-5.patch | 627 bytes | fizk |
#3 | 2037033-slow-creation-3.patch | 627 bytes | fizk |
#1 | nodequeue_creation_slow-2037033-1.patch | 1.16 KB | boyan.borisov |
Comments
Comment #1
boyan.borisov CreditAttribution: boyan.borisov commentedI am providing a patch which will add in the module its own function to take care to invalided the views cache.
Comment #2
boyan.borisov CreditAttribution: boyan.borisov commentedAny comments?
Comment #3
fizk CreditAttribution: fizk commentedMaybe something like this, where the normal behaviour isn't changed, but developers can implement
hook_nodequeue_save_invalidate_cache_alter($invalidate_callbacks)
to remove "views_invalidate_cache" and prevent it from being called, and also add their own callbacks.Comment #4
fizk CreditAttribution: fizk commentedComment #5
fizk CreditAttribution: fizk commentedTriggering automated tests.
Comment #6
jenlamptonLooking good, but we'll need to add information about the new hook to the nodequeue.api.php file too.