I just profiled a cached Drupal 6 page with normal caching, and noticed module_list() doesn't manage to static cache the bootstrap modules - since bootstrap_invoke_all() calls it once each for hook_exit() and hook_boot(), that means a duplicate query on cached pages.
I didn't want to mess with module_list(), since that's quite fragile, (or at least not right this minute) but it's trivial to add a static cache to bootstrap_invoke_all(). Without the patch I was getting about 195-200 requests per second, with the patch 205-215 requests per second, at least 5% improvement.
Patch is only for Drupal 6, the same bug existed in Drupal 7 but I thought it was a regression introduced by me, apparently not.. #1064212: Page caching performance has regressed by 30-40% is where that was fixed.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | drupal-bootstrap_invoke_all-1103910-2.patch | 615 bytes | mikeytown2 |
| boo.patch | 615 bytes | catch |
Comments
Comment #2
mikeytown2 commentedRe-Roll
Comment #3
podarok#2 simple and good catch
looks good for me
Does this workaround fixed in D7 and D8?