Issue #2403💬 AnsweredOpened November 12, 2019by varadero0 reactions

Editor.load possibly causes memory leak

Quick answerby varadero

This is important. If not fixed, it makes GrapesJS dangerous to use especially in SPA applications.

Read full answer below ↓

Question

How to reproduce:Naviagate to https://grapesjs.com/demo.htmlOpen browser console (Chrome) and type the following: setInterval(() => editor.load(), 1000) and press EnterGo 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...

Answers (3)

varaderoNovember 15, 2019

This is important. If not fixed, it makes GrapesJS dangerous to use especially in SPA applications.

artfNovember 18, 2019

I'll check it out, but any help is welcome

diazemilianoSeptember 3, 2020

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.