This module can trigger multiple menu rebuilds in one request, e.g. when reverting features.

One way to work around this problem would be adding a parameter to skip menu_rebuild(), which would default to the current behavior. Thus the calling code could call menu_rebuild() just once at the end. See e.g. #2989623: Performance enhancement: Skip menu_rebuild() when deleting multiple pages for how this parameter could be used.

There are other possibilities that I didn't explore, such as registering a shutdown function.

CommentFileSizeAuthor
ctools-skip-menu-rebuild.patch910 bytesmfb

Comments

mfb created an issue. See original summary.

mfb’s picture

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

looks great

joseph.olstad’s picture

  • joelpittet committed f1b02e3 on 7.x-1.x authored by mfb
    Issue #2989620 by mfb: Performance enhancement: Allow menu_rebuild() to...
joelpittet’s picture

Category: Bug report » Task
Status: Reviewed & tested by the community » Fixed
Parent issue: » #2984057: Plan for CTools 7.x-1.15 release

I've committed this to the dev release, thanks for the performance patch

mfb’s picture

\o/🌍🐇🐋

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

joseph.olstad’s picture

@joelpittet, before I can tag a release of features with this in it #2989623: Performance enhancement: Skip menu_rebuild() when deleting multiple pages , I need you to tag a ctools release 7.x-1.15