See screenshot from newrelic, which is the breakdown of a node view page (handled by page manager). variable_config adds an extra 5% onto the time. I think the problem is caused by the unconditional call to variable_config_fetch_all_variables() in entity_load(). variable_config_fetch_all_variables results in a query of all field and field instance data.

Screen Shot 2013-02-01 at 01.01.22.png

I think variable_config may need to store its own cache detailing which fields have config data and use that as a more direct method of determining which field instance data needs to be loaded rather than querying all drupal field instances to find this out.

Or, at least, the return from variable_config_fetch_all_variables should be cached in drupal cache tables.

CommentFileSizeAuthor
Screen Shot 2013-02-01 at 01.01.22.png106.03 KBmrfelton

Comments

mrfelton’s picture

Status: Active » Fixed

Added both a database cache and a static cache to help speed this up somewhat.

http://drupalcode.org/sandbox/jucallme/1880648.git/commitdiff/03ea5fe?hp...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Project: » Lost & found issues

This issue’s project has disappeared. Most likely, it was a sandbox project, which can be deleted by its maintainer. See the Lost & found issues project page for more details. (The missing project ID was 1880648)