As of 7.x-1.2 the hook_flush_caches was implemented. This calls menu_rebuild to be performed. However in certain cases such as Clear Class Registry, Clear Pages, or CRON the menu_rebuild is also called prior to executing breakpoints_flush_caches. This is interaction with the panels module, specifically layouts which is added as an include through ctools. When the layout menu is added during a menu_rebuild it is through ctools which caches the ui objects. Since the panels_layouts_ui object removes the add property in its implementation of hook_menu subsequent runs of menu_rebuild do not include the layout menu functions. This causes the layout menu items to disappear become unusable. A call stack is follows:
index.php.{main}:21
includes/menu.inc.menu_execute_active_handler:517
includes/menu.inc.call_user_func_array:{/userdata/www/usuhs.dev/includes/menu.inc:517}:517
profiles/panopoly/modules/contrib/admin_menu/admin_menu.inc.admin_menu_flush_cache:898
profiles/panopoly/modules/contrib/admin_menu/admin_menu.inc._admin_menu_flush_cache:977
includes/module.inc.module_invoke_all:895
includes/module.inc.call_user_func_array:{/userdata/www/usuhs.dev/includes/module.inc:895}:895
profiles/panopoly/modules/contrib/breakpoints/breakpoints.module.breakpoints_flush_caches:896
profiles/panopoly/modules/contrib/breakpoints/breakpoints.module.breakpoints_themes_enabled:102
includes/menu.inc.menu_rebuild:2721
includes/menu.inc.menu_router_build:2755
includes/menu.inc.call_user_func:{/userdata/www/usuhs.dev/includes/menu.inc:2755}:2755
profiles/panopoly/modules/contrib/ctools/ctools.module.ctools_menu:535
profiles/panopoly/modules/contrib/ctools/includes/utility.inc.ctools_passthrough:28
profiles/panopoly/modules/contrib/ctools/includes/export-ui.menu.inc.ctools_export_ui_menu:20
profiles/panopoly/modules/contrib/panels/plugins/export_ui/panels_layouts_ui.class.php.panels_layouts_ui->hook_menu:14
Caching occurs as part of ctools_export_ui_get_handler in export-ui.inc called in ctools_export_ui_menu
Comments
Comment #1
dave reidThis very well might be resolved by #2415363: Replace calls with menu_rebuild with variable_set('menu_rebuild_needed').
Comment #2
quicksketchConfirming this issue. We're seeing Breakpoints module responsible for up to 30 seconds of additional processing time due to rebuilding the menu once per enabled theme. I'll take a look at your patch Dave Reid and see if I have any luck getting it to pass tests.
EDIT: Sorry I meant to post this to #2378449: Performance issue with Breakpoints doubling time for drush cc all. Though I think Dave Reid is right that his patch may also solve this problem as a side-effect.
Comment #3
Jānis Bebrītis commentedCould be related to #2505127: breakpoints_flush_caches unintentionally invoked by system_cron
Comment #4
attiks commented#2378449: Performance issue with Breakpoints doubling time for drush cc all is committed, so might be solved, if not feel free to re-open