[wp-trac] [WordPress Trac] #28580: Speed up customizer by lazy-loading panels/sections/controls and settings as needed
WordPress Trac
noreply at wordpress.org
Sat Jan 21 18:31:13 UTC 2017
#28580: Speed up customizer by lazy-loading panels/sections/controls and settings
as needed
-------------------------+-----------------------------------
Reporter: westonruter | Owner:
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Customize | Version: 3.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: javascript, rest-api
-------------------------+-----------------------------------
Comment (by celloexpressions):
We need to be careful not to make the experience worse. Often when
implementing single page apps or single page JS-driven sites that rely
heavily on Ajax requests, the experience actually feels slower than a
normal pageload because users don't get the traditional browser feedback
that a new page is loading.
I remain extremely skeptical of loading controls "as-needed" since users
could easily navigate to a section and then end up waiting for something
to load. If we go that route, we'll need to benchmark the load time for
accessing individual elements versus loading everything up front and prove
that the change is a usability improvement for a majority of cases.
Individual Ajax calls can be very slow in many places regardless of how
much data we're loading, to the extend that loading everything at once is
often better for UX.
Rather than lazy-loading everything, we could have much more impactful
changes if the lazy-loading is used in more refined situations such as:
- Loading everything via Ajax when the customizer is bootstrapped from the
front end, rather than loading pieces more granularly
- Menu item and widget controls and settings could be loaded when the
associated panels are first expanded, so that they don't impact initial
load but are ready by the time a user navigates (note that menu item
controls aren't rendered to the DOM until the associated menu section is
expanded, which is a great balance in terms of speed/performance and
scales easily to hundreds of menu items).
- Theme controls don't need to be loaded until the themes panel is
expanded (which is how #37661 handles things).
- It may be reasonable to wait to load panel controls until the panel is
expanded, but you'd want the sections there already.
Generally, my concern is that "just-in-time" loading will really end up
being "just-too-late" and usability would suffer as a result. We also need
to think about how this would impact things like visible edit shortcuts,
partials, and autofocusing. Loading things on demand sounds shiny but
isn't necessarily the best approach for users (Calypso suffers
horrifically here on poor internet connections).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28580#comment:31>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list