editor.load possibly causes memory leak
Question
How to reproduce:
- Naviagate to https://grapesjs.com/demo.html
- Open browser console (Chrome) and type the following:
setInterval(() => editor.load(), 1000)and press Enter - Go to "Memory" tab (Chrome) and look at the memory usage
What happens: The memory is constantly increasing. If you open Chrome's "Performance monitor" you can also see "DOM nodes" and "JS event listeners" constantly increasing. After about 3 minutes "JS Heap size" increases from 24MB to 1000MB, "JS event listeners" increases from about 1600 to 50000+, "DOM nodes" from 8600 to 100000+. After some time the browser tab will crash because of the high memory consumption.
The same happens also if you have very simple grapesjs project and place a single block in the canvas and start in an interval a call to editor.load().
Answers (3)
This is important. If not fixed, it makes GrapesJS dangerous to use especially in SPA applications.
I'll check it out, but any help is welcome
I'm having the same issue here. Even after destroy the editor, the issue remains.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #4323
BUG: Performance issue while dragging component to canvas when you have 2k component on canvas
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Google Chrome Version 101.0.4951.41 (Officia...
Issue #4497
BUG: Updating to GrapesJS v19.5 from v18.4 results in Chrome becoming unresponsive
GrapesJS version[x] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 104.0.5112.79Reproducible demo link h...
Issue #3857
BUG: Firefox issue when the user clicks on different component very fast
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? FirefoxReproducible demo link https://grapes...
Issue #1470
[Question] Possible memory leaks
Hi, I am working on a project with Angular 6 and I am investigating a memory leak after destroying the editor on _previousAttributes and po...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.