This patch is by jabart, it caches the variables in the cache table.

I ran some benchmark for a cached page:

52ms +- 3.4 with patch
62ms +- 2.4 without

CommentFileSizeAuthor
bootrap.inc.patch1.45 KBkilles@www.drop.org
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dries’s picture

Do your numbers claim that this patch improves page generation time by 19%? If not, please explain how to interprete these numbers.

killes@www.drop.org’s picture

That's the claim, yes. I think the majority of the improvement is not achieved by exchanging the executed db query, but by avoiding the processing of all variables in a loop afterwards. unserialize() is apparenty much faster.

Dries’s picture

How many variables do you have in your variable table?

Dries’s picture

I tried this on my localhost using a variable table with 320 variables.

  • When caching is disabled, I measure a performance improvement of 1%.
  • When caching is enabled, I measure a performance improvement of 20%.

I think this makes this patch worth committing.

Dries’s picture

Committed to HEAD.

Anonymous’s picture