Skip to content
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

Massive memory leak: all DOM nodes will be retained forever #2866

Open
WolfBearGames opened this issue Nov 10, 2024 · 2 comments
Open

Massive memory leak: all DOM nodes will be retained forever #2866

WolfBearGames opened this issue Nov 10, 2024 · 2 comments
Assignees

Comments

@WolfBearGames
Copy link

WolfBearGames commented Nov 10, 2024

When using the Editor and loading longer and multiple document the number of DOM nodes in the document keeps growing and never goes down again.
Using Chrome Developer tools memory analyzer and looking for "detached DOM nodes" shows all the "ce-block" divs that were ever loaded in the editor.

Steps to reproduce:

  1. Load some content into the editor (the demo website will do)
  2. delete the content or load new content
  3. look at the Chrome Developer Tools memory Analyzer

Expected behavior:
the DOM nodes are not retained forever, but get garbage collected after they have been deleted or a new document has been loaded (using render())

Editor.js version:
2.30.6 (but i think all version will be affected)

Plugins you use with their versions:
multiple, but the problem also occurs with the demo website and the default plugins. The problem is in the core of the editor.

I consider this a major bug, because it means every longer running application using the Editor will leak memory until it gets unusable.

@WolfBearGames
Copy link
Author

Even calling destroy() on the Editor instance and setting the Editor reference to null does not release the DOM nodes.

@neove
Copy link

neove commented Nov 29, 2024

same problem ~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants