Closed (fixed)
Project:
Administration menu
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
7 Aug 2008 at 22:26 UTC
Updated:
16 Nov 2008 at 17:52 UTC
Jump to comment: Most recent file
By replacing theme('menu_item_link') with a stripped down, high-performance implementation that avoids theme layer invocation, we're able to greatly reduce the rendering lag. On my installation, typical rendering times (ie. the time spent in admin_menu_footer()) went down by nearly 50 percent.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | admin_menu-performance.patch | 1.81 KB | smk-ka |
| admin_menu-performance.patch | 1.58 KB | smk-ka |
Comments
Comment #1
smk-ka commentedDang, missed a E_NOTICE, fixed.
Comment #2
pwolanin commentedIs the main benefit from omitting the alias lookups?
Comment #3
sunI really think that smk-ka should answer this question, but we had a similar implementation in D5 - completely skipping alias lookups as well as Drupal's theme system, because it simply slows down the rendering while no one has ever tried to override admin_menu's output. This is because we simply output an unordered list containing links and all the styling happens via CSS and JS.
Comment #4
smk-ka commentedOmitting alias lookups was already in place since the beginning. While the patched code also skips a few unneeded checks in l(), the main performance increase comes from avoiding the theme() invocation layer, as sun correctly supposed.
Comment #5
sunThis saves approx. 14 ms on each page request. Committed to all branches.