JSONovich / jsonovich

A webextension for Firefox. Pretty-prints JSON content in the browser for easy, unobtrusive viewing.
https://addons.mozilla.org/firefox/addon/jsonovich/
Mozilla Public License 2.0
7 stars 3 forks source link

Too many DOM nodes generated from large JSON documents #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We need to find a way to limit the number of DOM nodes in our formatted output.

Loading a large document causes the browser's interface to freeze, sometimes 
for several minutes in my testing. The formatting must be moved out of the 
stream converter so that it can happen asynchronously after the browser has 
displayed something. The entire formatted output should not be added to the 
page in one operation, even asynchronously this would cause a freeze.

We could either add more nodes as the user scrolls down to gradually build the 
formatted output (easier) or only insert DOM nodes that would be visible and 
remove them when scrolled out of view (cooler and I like a challenge :D ).

Original issue reported on code.google.com by W.Elwoo...@gmail.com on 3 Jun 2011 at 10:03

GoogleCodeExporter commented 9 years ago
Related to this, 2/3 of the time spent frozen is caused by CSS 
:before{content:''} rules...

Original comment by W.Elwoo...@gmail.com on 8 Jun 2011 at 11:10

GoogleCodeExporter commented 9 years ago
Hi, I am also facing this issue. When loading a large json my browser gets 
unresponsive and scrolling becomes very slow.

Original comment by jithin1...@gmail.com on 2 Feb 2012 at 4:17