Opened 9 years ago

Last modified 7 years ago

#2823 confirmed Bug

V3: Dialog API lazy load

Reported by: Frederico Caldeira Knabben Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:


As of today, the "dialog" and "dialogui" plugins represent 35KB (23KB + 12KB) of our compressed code. Some cleanup may help, reducing it to about 30KB, which is still a big portion of the total code size (currently 120KB, dialog included). We must also consider that, during the time, the code tends to get bigger, with new features and fixes.

Considering the above problem, and also that the dialog plugin is not needed to the editor to get created into a page, we could think about a lazy loading system for it. In this way, just the very basic dialog code would endup into ckeditor.js, having the rest of its logic available into another file.

A configuration option could be used to set it up:

// Load the dialog code 5 sec after the main plugin loading.
config.dialog_lazyLoad = 5;

// Load the dialog code immediately.
config.dialog_lazyLoad = 0;

// Load the dialog code only when opening a dialog.
config.dialog_lazyLoad = -1;

An event could be fired by the dialog code once loaded, so other parts of the code (like plugins) could customize it.

We must still make it possible to optionally include the dialog code into the compressed ckeditor.js file.

Change History (2)

comment:1 Changed 9 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.0CKEditor 3.x

comment:2 Changed 7 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.x

Milestone CKEditor 3.x deleted

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy