0

Would it be possible to force a webbrowser reducing render quality to increase speed? I want to show big html-structures (document.getElementsByTagName("*").length returns 661844 elements).

At the moment the website needs about 2.8s to load the content (~13MB but gzip compressed), but the DOMContentLoaded event is triggered about 46s after start - this is far to long. Between pressing the "start button" and the DOMContentLoaded event the browser doesn't respond and therefore I want to reduce the time.

any suggestions?

NaN
  • 3,411
  • 7
  • 41
  • 75
  • 1
    Just 660k? Haha. Why not use AJAX? You won't be needing all these elements right from the start I reckon? – EricG Aug 09 '12 at 11:22
  • ok, its a old laptop, but it takes still to long. Why Ajax? This would only change the way I receive the data, but it still has to be rendered. – NaN Aug 09 '12 at 11:32
  • 1
    q@NaN: In most cases, you don't actually need all 660k elements right at the start of the page, instead you can simply AJAX a smaller chunk of data and load more as the user browses around. Forcing the user to download all 13MB of data before they can do anything is never a good user experience, especially if they really only need two of those items. – Lie Ryan Aug 09 '12 at 11:42

1 Answers1

1

There is no such thing as "draft" rendering, but there are ways to prevent the browser from locking up: Prevent long running javascript from locking up browser

Community
  • 1
  • 1
Lie Ryan
  • 58,581
  • 13
  • 95
  • 141