4 ms·
Based on my experience as a Firefox developer investigating memory usage reports, the worst-performing "normal" web pages in terms of memory have: 1) Lots of s
by bzbarsky 7y ago
Based on my experience as a Firefox developer investigating memory usage reports, the worst-performing "normal" web pages in terms of memory have:
1) Lots of script (megabytes).
2) Possibly loaded multiple times (e.g. in multiple iframes).
3) Possibly sticking objects into global arrays and never taking them out (aka a memory leak for the lifetime of the page).
4) Loading hundreds of very large images all at the same time.
5) Loading hundreds or thousands of iframes that all have nontrivial, if not huge, amounts of script. Social media "like" buttons often fall in this bucket.
There are obviously also pathological cases: if your HTML has 1 million elements in it (not a hypothetical; I've seen this happen), memory usage is going to be high, obviously. And arguably having a page with thousands or hundreds of thousands of JS functions is "pathological" too, but it's pretty normal nowadays...