Demos: Improve page performance by pre-rendering nav menu collapsibles #7225

gabrielschulhof opened this Issue Mar 9, 2014 · 0 comments


None yet

1 participant


I added a console.log to the widget factory so I can get a tally of what widgets we instantiate in the demos as you load one demo after the other. Our most-instantiated widget? The humble collapsible. That's because it's present in the left-hand-side navigation menu, which in turn is present on, like, all demo pages.

So, I wrote a test that loads (almost) all demo pages and measures how long they take to load. By pre-rendering the collapsibles in demos/jqm-contents.php the total time it takes to sequentially load the pages listed in the test was reduced in length by nearly 4s.

@gabrielschulhof gabrielschulhof added this to the 1.4.3 milestone Mar 9, 2014
@gabrielschulhof gabrielschulhof self-assigned this Mar 9, 2014
@gabrielschulhof gabrielschulhof added a commit that referenced this issue Mar 10, 2014
@gabrielschulhof gabrielschulhof Demos: Pre-render collapsibles in demos left-side menu
(cherry picked from commit 08f1e7c)

Fixes gh-7225
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment