-
Notifications
You must be signed in to change notification settings - Fork 78
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
Ck editor initializing is so slow. #82
Comments
@oleq, can you take a look at this one? |
What's the version of |
Can you share the editor data you're using to initialize it? |
I cannot reproduce it. In an empty directory, I called:
Then I used the following <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<h1>Hello world!</h1>
<div id="app">
<ckeditor :editor="editor" v-model="editorData" @ready="onReady"></ckeditor>
</div>
<script src="node_modules/vue/dist/vue.min.js"></script>
<script src="node_modules/@ckeditor/ckeditor5-build-decoupled-document/build/ckeditor.js"></script>
<script src="node_modules/@ckeditor/ckeditor5-vue/dist/ckeditor.js"></script>
<script>
Vue.use( CKEditor );
const app = new Vue( {
el: '#app',
data: {
editor: DecoupledEditor,
editorData: '<p>Content of the editor.</p>',
},
methods: {
onReady( editor ) {
// Insert the toolbar before the editable area.
editor.ui.getEditableElement().parentElement.insertBefore(
editor.ui.view.toolbar.element,
editor.ui.getEditableElement()
);
}
}
} );
</script>
<style>
.ck.ck-editor__editable_inline {
border: 1px solid #ccc;
}
</style>
</body>
</html> I cannot say its blazingly fast (because it's still 0.5MB JS in the CKEditor build), but it's nothing like 3s of waiting. Can you confirm using this minimal sample? |
I mean, do you experience the lag when using the sample I provided? |
I'm closing this issue as we're not able to reproduce the problem. If you'll have some more information about it, feel free to comment - we'll check it. |
@oleq i tested some another wysiwyg component's. Scrumpy - first instance load - 0.5s. I tested this with full plugin's list enabled. But ckeditor decoupled loading take's too much time on notebook's for example. But there not too much plugins like in froala, which loading too faster. |
So, maybe you should take some test's and detect which one function loading takes too much time? |
See #82 (comment) Without the content you load into the editor it's hard for us to test or relate to your issue. |
I said, it's empty. It's not related to data rendering at all, it's some js/timeouts/promises problem. |
Could you provide a sample, with all the code and dependencies on which we could reproduce this (ideally, a repository)? Just to be sure we're looking at the exact same thing. Right now, we don't see any major issue but perhaps we're checking something slightly different than you. Also, please share a screenshot of a timeline recorded on this demo. |
As i said above im using empty project for testing. |
Thanks for the sample and the profile. I used the sample and here are the results: @afwn90cj93201nixr2e1re 's waterfall (~3,5s)My waterfall (~0,7s)I admit the difference is huge (it's around 5x) and TBH I'm not sure why. Could it be my hardware is 5 times faster in that case? I tested in vanilla Firefox 68.0.1 (64-bit) (no add-ons etc.). Can you @afwn90cj93201nixr2e1re perform the same test in a clean Firefox installation? Just to make sure we're on the same page. |
it was clean. it's not related to browser or cpu, i mean more huge wyswigs initiazing take near 0.5s(#82 (comment)), but with ckeditor it take's near 3s. Maybe you can create some build with debug where we can find info about how many time takes each function? |
I ran the same test on another machine (Windows 10 this time) with a 10-year old CPU (Phenom II X4) and it took 1.5s to initialize the editor: We know there's room for improvement (in various parts of the editor framework) but it's not nearly as bad as you suggest. And given your hardware configuration (Intel i9) this is even more disturbing because the editor should initialize way, way faster. So my guess it's either your OS (which one, BTW? Is it Linux?) or some other components (GPU?) causing some issues. Maybe you could try and run this demo on another machine and we could compare the results? Anyway, this is the first time we see a performance issue this off the scale. There were some in the past but this is a new level. Unless we have more data (cases), it's hard for us to figure anything out because (as you saw) I tried to reproduce the problem but to no avail. Sorry 😔 |
What about this one? It's also can help to check which function initializing take's too much in future
7/8.1/10 win, 1060 6gb, 16gb RAM. |
You can get this information straight, e.g. from Chrome dev tools (waterfall in the performance tab). There are plenty of functions that are used excessively and could be optimized but there's no single culprit here (like "one place to fix it all"). |
No, i can't. Coz it's minized. And here no options to get each function executing time. |
@oleq I wonder if there is any way to improve startup performance. I'm initializing ckeditor on user click and it takes about 400-800ms on my desktop i7 6700, which is a noticable delay. If i do the same with 4x throttling in dev tools, this time goes up to 3s+, which means it is pretty much unusable for people with low-spec laptops. I'm talking here about initializing editor with just a few words without any initial formatting, so that it is not the input size problem. Also, i'm using custom build with just the plugins i need(pretty close to the official balloon build). Maybe there is some way to pre-initialize ckeditor without content and without adding it to DOM? Or some other workaround to improve startup performance with initialize-on-click strategy. |
@pshurygin Do you experience this lag using the Vue adapter only or also when using the vanilla CKEditor API ( |
Can you create vue app with vanilla CKEditor initializing with checkbox, xD? We are not familiar with CKEditor like you. |
@oleq I'm using vanilla api BalloonEditor.create() |
Hi, I just overcame a painfully slow initialization of ckeditor 5. What I changed was this section in webpack.config.js:
To
Hope this helps someone. |
Comment.
The text was updated successfully, but these errors were encountered: