This helps prevent unnecessary multiple rebuilds on the same request.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2415363-menu-rebuild-variable.patch | 1.2 KB | dave reid |
This helps prevent unnecessary multiple rebuilds on the same request.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2415363-menu-rebuild-variable.patch | 1.2 KB | dave reid |
Comments
Comment #1
dave reidComment #3
dave reidLooks like the 7.x-1.x tests are currently failing, so nothing new introduced in this patch.
Comment #4
quicksketchI confirmed this issue. On our site, I was seeing menu_rebuild() being called *five* times when flushing caches, because we had 4 enabled themes (plus the menu_rebuild() that happens normally in the first place).
Unfortunately this patch doesn't 100% fix the problem. menu_rebuild() is still called twice, once on the current page load when flushing caches and then a second time on the next page load. This is because of the order of
drupal_flush_all_caches():So menu_rebuild() is called once by the function directly, then the call to
module_invoke_all('flush_caches')will set the variable and the menu_rebuild() will be called again on the next page request.I think this patch is a good fix and solves most of the problem. However, I think that this patch should be applied *in addition* to #2378449: Performance issue with Breakpoints doubling time for drush cc all. Combined, they'll reduced the menu_rebuild() calls down to a single one on cache clears. So marking this RTBC.
Comment #5
quicksketchI filed a patch that combines the two issues over at #2378449-8: Performance issue with Breakpoints doubling time for drush cc all. However, if we want to commit this patch first, this one is still RTBC by itself.
Comment #6
dave reidThis was fixed via #2378449: Performance issue with Breakpoints doubling time for drush cc all