News for hackers. Stuff that matters.
Re:Chrome Never-Slow Mode Prototype by Someone1234 on Tuesday February 05, 2019 @02:32PM (#19088867)
That's really cool. The only thing missing is the total number of DOM elements on a page. I've seen production sites with literally thousands, and it slows most browsers to a crawl (and balloons memory).
Re:Chrome Never-Slow Mode Prototype by recursive on Tuesday February 05, 2019 @03:36PM (#19089538)
This comments page has over 1194 elements on it right now, with only 34 comments. Thousands is peanuts.
Re:Chrome Never-Slow Mode Prototype by rifung on Tuesday February 05, 2019 @03:09PM (#19089259)
If the issue of too many DOM elements is memory use, wouldn't it be better to just limit the memory use of a page?

Apologies if this is a really ignorant question as I know very little about browsers/front end development.

Re:Chrome Never-Slow Mode Prototype by developit on Tuesday February 05, 2019 @03:18PM (#19089357)
It's more than memory use - it causes tree traversals to take longer, which means unbounded style recalculations (common) and side-effecting DOM changes take longer.
Re:Chrome Never-Slow Mode Prototype by TomMarius on Tuesday February 05, 2019 @03:11PM (#19089273)
There are legit uses of RAM, fully fledged web apps are ordinary now
Re:Chrome Never-Slow Mode Prototype by ummonk on Tuesday February 05, 2019 @03:32PM (#19089488)
Thousands isn’t really a whole lot. If you have say a table with 10 columns and 50 rows and have complex content in the cells (including div elements) you’ll be well into the thousands.