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.

Comments

Status: Needs review » Needs work

The last submitted patch, boo.patch, failed testing.

mikeytown2’s picture

Status: Needs work » Needs review
StatusFileSize
new615 bytes

Re-Roll

podarok’s picture

#2 simple and good catch

looks good for me
Does this workaround fixed in D7 and D8?

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.