On a site with many fields (I have a production site with 542 fields!) use of views_fetch_data() without $table is very slow, even when using memcache. (well, very slow in general without #1421844: views_fetch_data() cache item can reach over 10mb in size.)
To avoid the overhead, entity should be caching the base table list it computes.
Using views caching to store the base table list should allow caching while still being refreshed as needed.
See also #1421844: views_fetch_data() cache item can reach over 10mb in size for the views side of the performance equation on large sites.
Patch coming in a moment.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1558340-cache-base-table-list.patch | 1.32 KB | bdragon |
Comments
Comment #1
bdragon commentedAnd the patch.
Comment #2
fagoIs hook_views_plugins() invoked often? If so, I think that patch makes a lot of sense. (I ran into this memory issue already too).
If it's just invoked on cache-build it shouldn't matter though - I guess you have investigated that?
Comment #3
bdragon commentedIt was every page load on a views page for me. It might be something that only happens when using views from code though, views does certain sanity checks for those that it might skip for views from database....
Comment #4
fagoI see, it seems to be a static cache only. So it makes a lot of sense - thanks for catching it. Committed.