Single Page Application - Large DOM - SLOW
I'm developing a single page application that uses a lot of widgets
(mainly grids and tabs) from the jqWidgets library that are all loaded
upon page load. It's getting quite large and I've started to notice after
using the site for a couple minutes the UI becomes quite slow and
sometimes non-responsive, when the page is refreshed everything works
smooth again for a few minutes then back to laggy. I'm still testing on
localhost. My initial reaction was that the DOM has too many elements
(each grid creates hundreds of divs! And I have a lot of them) so event
listeners which are tied to IDs have to search through too many elements
and become slow. If this is the case it won't be too hard to fix, is my
assumption likely to be the culprit or do I have worse things to fear?
No comments:
Post a Comment