Front-end performance of the toolbar is quite poor in Chrome/safari webkit browsers, reasonable in Firefox and untested in IE(so far). Not in terms of asset loading, but simply in terms of perceived performance on screen.
probably helped with that, but when JS is enabled, it's still pretty awful. Very significant flickering. Everything you see in the toolbar, is done through JS, except the bulk of the rendering:
- The toolbar is only initialized AFTER the document is ready (because it is implemented as a behavior). Consequently, this has flicker pretty much by design.
- Once that is done, even then there are lots of performance problems (too much stuff being called multiple times, too slow jQuery stuff in the critical path, too much JS reliance in general).
Drupal.displace()is called multiple times, and hence can cause multiple displacements of the underlying page. Worse, in order to determine how to displace, it traverses the DOM.
Get rid of the useless
.each() call (which in case of attaching the behaviors BEFORE the document is ready apparently blocks until the document is ready anyway…)
- Review Patch
User interface changes
- No visible changes but we added a hidden control element to toolbar (and which will be removed after JS executed0
This is what we have after patching:
- There's should be no vertical jumping anymore
- There's 1px movement from LEFT to RIGHT (affected by active-link.js, it changed the font weight.)
- There's flashing on Toolbar only. This is loading & rendering the SVG icons.
- N / A
Data model changes
- Insert a control element to toolbar elements. (affect theme element only, no DB changes)