ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

Performance issues caused by graveyard when deleting content

Open Tsuk1ko opened this issue 1 year ago • 2 comments

📝 Provide detailed reproduction steps (if any)

  1. Put a large amount of text content in editor and delete them (make them move to the graveyard)
  2. Clear all contents and type some words
  3. Delete them

✔️ Expected result

The removal process should be quick.

❌ Actual result

The removal process is extremely slow.

https://github.com/user-attachments/assets/a83bc01f-a9f2-440a-b3cd-b6eaeab48e9c

❓ Possible solution

This seems to be caused by the diff processing _getChildrenSnapshot of the graveyard when moving content to it.

Currently I can only avoid this by manually clearing the graveyard and history at an appropriate time.

And I tested some other editors such as Quill and ProseMirror, they don't have this issue.

📃 Other details

  • Browser: …
  • OS: …
  • First affected CKEditor version: …
  • Installed CKEditor plugins: …

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

Tsuk1ko avatar Dec 04 '24 10:12 Tsuk1ko

This looks like a very interesting find. As you may know we are in the middle of introducing multiple performance improvements in the editor. So far we focused mostly on editor loading and editor.getData() speed. But we also look forward to optimize user actions, like typing, deleting, etc. This is something we will surely look at. Thanks!

scofalik avatar Dec 04 '24 10:12 scofalik

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Dec 04 '25 23:12 CKEditorBot