kirki icon indicating copy to clipboard operation
kirki copied to clipboard

Speed up customizer by lazy-loading controls and settings as needed

Open DevelopOnline opened this issue 11 years ago • 1 comments

Regarding to this ticket:

As more and more controls and settings get added to the customizer, it's performance is bound to take an increased hit (Specially in Chrome browser). The Widget Customizer work showed that settings and controls can be created dynamically after the customizer loads.

So, How kirki customizer controls can be loaded with a lazy loading method like the method that was explained above?!

DevelopOnline avatar Apr 11 '15 14:04 DevelopOnline

This is currently implemented in the number control.

It requires using undescore.js to write the template files and hook them to content_template instead of render_content in order to work.

You can take a look at https://github.com/aristath/kirki/blob/master/includes/Controls/NumberControl.php if you want to get an idea of how that works...

It's on our TODO list, but not a big priority, primarily because I know very little about underscore.js and don't know how to do it efficiently yet.

We do welcome PRs though... :smile:

aristath avatar Apr 11 '15 15:04 aristath