-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building from Source with multiple editors on a page is causing lag on initialization #124
Comments
One other note... As I eliminate plugins, the page begins to load faster and faster. If I remove them all, it loads instantaneously. |
Hi! Thanks for this report. I checked it and indeed there is a tiny difference of speed in those cases. cc @oleq Can you take a look at this? |
I'm afraid this is nothing new (or related to Vue). I ran your code and checked the performance stats and this is what it looks like when a single editor is created on a button click: The initialization of the toolbar takes nearly .5s. We are aware of the issue and we track it here ckeditor/ckeditor5#6178. |
Is it related to the UI itself? You linked to ckeditor/ckeditor5#6178, but I only saw performance issue reports (related to bootstrap time) from the Vue integration. Isn't there something related to Vue which deoptimizes the editor? Could you make some quick timeline comparison for identical Vue+CKE and standalone CKE setups? |
You were right @Reinmar. I created the same builds with Vue.js stack (vue-cli) and without it (same plugins, same config, no content). In my scenario, the editor instance is created upon button click to eliminate any network impact. The vanilla CKEditor from source:Vue CLI app in the development (
|
The standard 480ms is definitely nothing spectacular – we should definitely be looking there for improvements someday. However, it's disturbing how badly Vue affects CKEditor 5. I wonder if this happens with other kinds of apps/libs too. |
I was right about nasty polyfills. I used the "modern mode" of Vue CLI and the bundle size decreased to 700kb (was 890, vanilla CKEditor is 640) and the performance is way better now (it corresponds to vanilla CKEditor): |
@benjaminprojas Can you confirm dropping heavy polyfills speeds up the editor? |
@oleq I am happy to give that a try, but this is the first time I've heard of "Modern Mode". I need to see if there is a way to convert my already existing application into that before I can fully test. I'll let you know. |
@oleq, I just did a build using "Modern Mode" (which required some significant restructuring) and I can see no noticeable difference when loading the page with 5 editors. It still locks up for me for roughly 3 seconds or so. Here is a video of it happening built with modern mode: https://help.supportally.com/KouepDmw |
Why? It all comes down to babel configuration. The app should work fine in any modern browser without polyfills. Anyway, we're keeping track of performance issues. Hopefully, some improvements proposed in ckeditor/ckeditor5#5880 will make things better for you. |
Yes, the restructuring was for babel, not the app itself. At any rate, I know what to do now to test again. Thanks @oleq, I'm hoping so as well. |
Let me also mention that we did a bit of research recently and we identified a couple of performance issues (recent regressions) that we're fixing now. Some fixes will make into the upcoming release. Some will have to wait a bit, probably till the next one. Depending on the setup, I think that we can save up to 40% on bootstrap time. |
I've updated to 18.0.0 and while I do see some improvement, the general issue remains. More than one editor and it still lags to load the page. |
We have a similar usecase and use 3 editors on a page(React) at once - like a form with each instance as a field. The lag is heavy. @benjaminprojas Did you ever find a solution? |
@amit-coditas Unfortunately, no. At this point just living with it as it doesn't lag after that initial load time. I'm on 21.0.0 currently. |
I'm using with Vue.js and import plugins, it's take 2s to render Editor. When i removed Table plugin, it's faster a little bit. My plugins was imported: import ClassicEditor from "@ckeditor/ckeditor5-editor-classic/src/classiceditor" |
Possibly related: #82
When only adding one editor to a page, it loads pretty quick (not as quick as I'd like, but ok).
However, when I have multiple on a page (5 in my tests), at the time the components are being initialized the entire browser freezes for about 3 seconds when mounting the components.
After the page loads each editor works great without any issues. When I navigate away and return (using vue-router so no reloading of assets) it happens again. It seems like its something on the mounted or created lifecycle event that is causing the issue.
I've got everything set up in webpack correctly and there are no console errors.
Here is my editor component:
The text was updated successfully, but these errors were encountered: