Open
Description
I just noticed that this module slow down Backdrop.
Some debug info: (it's a function call tree)
[2.5%] | | | | | | └── theme [0.06 Mb] [realtime: 2.993 ms]
[2.4%] | | | | | | | └── template_preprocess_block [0.06 Mb] [realtime: 2.828 ms]
[2.1%] | | | | | | | | └── contextual_pre_render_links [0.06 Mb] [realtime: 2.427 ms]
[2.0%] | | | | | | | | | └── menu_contextual_links [0.06 Mb] [realtime: 2.350 ms]
[1.5%] | | | | | | | | | | └── menu_get_item [0.05 Mb] [realtime: 1.763 ms]
[1.0%] | | | | | | | | | | | └── db_query_range [0.02 Mb] [realtime: 1.179 ms]
The real problem is here:
function menu_contextual_links($module, $parent_path, $args) {
......
$router_item = menu_get_item($path);
if (!$router_item || !$router_item['access']) {
$path_empty[$parent_path] = TRUE;
return $links;
}
When I disable this module, page execution time decrease for ~10% for 6 blocks (like menu, breadcrumbs, footer and etc... you know, default one)
When I tested with 11 blocks, page execution time difference was 20%
- 150ms (contextual links enables)
- 118ms (disabled).
I don't have a solution for this issue so far.