Voting starts in March for the Drupal Association Board election.
views_fetch_data get the views table information. To not run all the hooks all the time there is a cache in
the database with the cid 'views_data' , which is loaded on every page with a view.
The problem is that the result is getting really big really fast, so on some sites
it is over 10MB.
Most of the time you don't have to load all the information, but just the information from one certain table.
If the $table parameter is specified just load the data from a cache specific for the single table.
At the same time write one additional cache entries for each tables, but keep the one for all
- General documentation of the new code
- If it is possible tests.
Original report by [username]
I'm working on a site with dozens of views and a need to scale to hundreds of near-simultaneous authenticated users. One of the memory hogs we're seeing in xhProf is the cache object loaded by
views_cache_get(‘views_data:en’), which seem to run every time any view is loaded on the page. That cache object (loaded from memcache) takes up 11 MB per request, so at the scale we want to reach, that's multiple gigabytes just for that item.
... some more, just asking why this is done.
PASSED: [[SimpleTest]]: [MySQL] 2,422 pass(es). View
FAILED: [[SimpleTest]]: [MySQL] 2,417 pass(es), 5 fail(s), and 2 exception(s). View
PASSED: [[SimpleTest]]: [MySQL] 1,449 pass(es). View