TPAC: Don't load dojo widgets unless we actually need them (for autocomplete)
Bug #1411699 reported by
Dan Scott
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
* Evergreen master
Currently, a number of conditions result in all of dojo -- including the widgets -- getting loaded. Although the JavaScript is cached for subsequent requests, this has a heavy first-load cost which can affect the user experience negatively. If we can make the widgets only be loaded when absolutely necessary (that is, when autocomplete is enabled), then we can make the page faster to load and improve the user experience.
Changed in evergreen: | |
milestone: | none → 2.8-beta |
Changed in evergreen: | |
milestone: | 2.8-beta → 2.next |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
tags: | added: performance |
Changed in evergreen: | |
assignee: | nobody → Bill Erickson (berick) |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Dojo was turned on unconditionally due to 92e84a389e because Dojo is currently required for the copy locations advanced search filter, a core feature, as part of bug #1314370. Loading Dojo adds roughly 600ms to page load and rendering time for functionality that is only necessary on a single page.
While the copy locations search filter is a core feature, we can still make it conditional so that Dojo is only loaded on the advanced search page using something like:
IF ctx.page == 'advanced';
want_dojo = 1;
END;
This would optimize the performance for every page other than the advanced search page.