question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SetComponents is sometimes very slow

See original GitHub issue

Hi all We’re working on a newsletter app and are using grapesjs as the email editor with the newsletter preset plguin and some custom changes. We store the HTMLs in our database and I noticed that some templates take a very long time to load with the editor.setComponents method.

I tried to load the templates in the demo page through the import and while it loads almost instantly, I did notice a peculiar issue on the newsletter demo page ( https://grapesjs.com/demo-newsletter-editor.html ). If a component is selected before importing a HTML template it takes a lot longer to load (from 0.5s up to 5s).

With inserting some logs I’ve figured that the backbone set method get’s called a lot more. Mostly ‘add’ models get duplicated, but there are also a lot of ‘change:style’ models. But I’m kind of at a loss here what is necessary and what not :S Maybe figuring out why setComponents get’s a lot slower if a component is selected, could help me figure out why it is also slow in our project.

I’ve also noticed that this starts happening after release 0.14.40. Any help is greatly appreciated.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:24 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
artfcommented, Apr 2, 2019

This shows you how to find issues with performances https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/

0reactions
abozhinovcommented, Jun 15, 2019

The time now is OK. My problem was when parsing JSON 2 HTML. I forgot that have self closing tags like BR and my script generate

. Thanks for your support.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Intent is very slow to launch a new Activity :( - Stack Overflow
I have a service that sends this intent and sometimes, it takes forever to start the app. I have noticed that if the...
Read more >
My React App is Slow. What Should I do? | by David Han
When you type into the search input below, you'll notice that it's very slow and you can't type without a noticeable delay.
Read more >
VTK/Tutorials/DataArrays - KitwarePublic
But we really want that performance increase for the ones that do -- SafeDownCasts are really slow! vtkArrayDownCast fixes this issue:.
Read more >
Crystal Radio Set Components & Parts - Electronics Notes
The circuits for crystal radio sets are relatively straightforward. ... Sometimes people made the actual components, other times they might buy the ...
Read more >
Sasquatch Utilities | Food4Rhino
Many components have been multi-threaded with additional checks built-in to prevent excess calculations that would otherwise slow down grasshopper scripts.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found