Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
bootrap.inc.patch | 1.45 KB | killes@www.drop.org | |
Comments
Comment #1
Dries CreditAttribution: Dries commentedDo your numbers claim that this patch improves page generation time by 19%? If not, please explain how to interprete these numbers.
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedThat'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.
Comment #3
Dries CreditAttribution: Dries commentedHow many variables do you have in your
variable
table?Comment #4
Dries CreditAttribution: Dries commentedI tried this on my localhost using a
variable
table with 320 variables.I think this makes this patch worth committing.
Comment #5
Dries CreditAttribution: Dries commentedCommitted to HEAD.
Comment #6
(not verified) CreditAttribution: commented