Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2011 at 18:20 UTC
Updated:
27 Feb 2015 at 10:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fietserwinI was playing a bit with the new Zend Server Z-Ray tool and found indeed that getting this info consistently takes over 10 ms on my local machine (all included data and programs on sdd, internal memory by far not exhausted). So a big yes to this feature.
To give it a kick, a first try.
Comment #2
fietserwinOK, if I post a patch, I can as well post a working patch, not just "a hint of how it could be done" :)
2nd try:
- working code.
- cached per language as the data contains translated strings (that's why we want to cache it...).
- execution time of _views_fetch_plugin_data() reduced to around 3-4 ms.
Comment #3
das-peter commented+1 to for caching.
Visual review looks good, only thing I found is this:
Throughout core following pattern is more common:
if ($cache = cache_get($cache_key)) {Comment #4
fietserwinThanks for reviewing. New patch attached. I found a bogus invocation that might defer any gains (though it did not in my local test). Feel free to not include that part, or open a separate issue for that, if there's something really wrong at that point.
Comment #5
kars-t commentedI ran the patch from #4 against my project and it doesn't seem like it broke anything but speed things up. The caching by language seems very reasonable. And the removing of the array from pager_plugin is wise as well or it will never cache.
From the code the patch seems clean. I think it is RTBC.
Comment #7
dawehner10ms is not that bad, honestly.
Committed to 7.x-3.x and pushed