Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm seeing this occasionally in New Relic:
And upon inspection find this:
The culprit seems to be the variable_delete('menu_rebuild_needed') call in subpathauto_url_inbout_alter():
/**
* Implements hook_url_inbound_alter().
*/
function subpathauto_url_inbound_alter(&$path, $original_path, $language) {
static $drupal_static_fast;
if (!isset($drupal_static_fast)) {
$drupal_static_fast['items'] = &drupal_static(__FUNCTION__, array());
}
$items = &$drupal_static_fast['items'];
// If the current menu item exists at this path, then we should not continue
// processing.
if (empty($items[$path])) {
$menu_rebuild_needed = variable_get('menu_rebuild_needed', FALSE);
// In no cases rebuild the menu while trying to load the menu item here
// since that would cause infinite loops if any module calls
// drupal_get_normal_path() in hook_link_alter().
variable_del('menu_rebuild_needed');
$items[$path] = menu_get_item($path);
if ($menu_rebuild_needed) {
variable_set('menu_rebuild_needed', TRUE);
}
}
if (!empty($items[$path]) && $items[$path]['href'] == $path) {
return FALSE;
}
if ($source = subpathauto_lookup_subpath('source', $path, $original_path, $language)) {
$path = $source;
}
}
The first time I saw this I thought it was a random outlier, but I've now seen it multiple times, happening on normal page views.
Any thoughts?
Comment | File | Size | Author |
---|---|---|---|
variable_delete2.png | 88.3 KB | JordanMagnuson | |
variable_delete.png | 43.69 KB | JordanMagnuson |
Comments
Comment #1
JordanMagnuson CreditAttribution: JordanMagnuson commentedI'm still seeing significant performance implications when using this module. Anyone else have data or input?
Comment #2
JordanMagnuson CreditAttribution: JordanMagnuson commentedStill an issue. Any thoughts son this?