codex-team / codex-team/editor.js
Massive memory leak: all DOM nodes will be retained forever
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.