3 ms·
At least Firefox does unload images outside the viewport. But it still has to store layout information of all the preceding elements to determine their placemen
by the8472 8y ago
At least Firefox does unload images outside the viewport. But it still has to store layout information of all the preceding elements to determine their placement in the document
Right now nightly says (9k posts)
│ ├──434.20 MB (48.20%) -- top(<anonymized-4294967585>, id=4294967297)
│ │ ├──429.00 MB (47.62%) -- active/window(<anonymized-4294967585>)
│ │ │ ├──292.77 MB (32.50%) -- layout
│ │ │ │ ├──109.99 MB (12.21%) ++ computed-values
│ │ │ │ ├───77.96 MB (08.65%) ++ style-structs
│ │ │ │ ├───71.80 MB (07.97%) ++ frames
│ │ │ │ ├───23.33 MB (02.59%) ++ (8 tiny)
│ │ │ │ └────9.70 MB (01.08%) ── text-runs
│ │ │ ├──121.27 MB (13.46%) ++ dom
│ │ │ ├────9.52 MB (01.06%) ── property-tables
│ │ │ └────5.44 MB (00.60%) ++ (2 tiny)
Reloading the page with only 100 posts:
│ ├───6.14 MB (04.16%) -- top(<anonymized-4294969763>, id=4294967297)
│ │ ├──4.98 MB (03.38%) -- active/window(<anonymized-4294969763>)
│ │ │ ├──2.82 MB (01.91%) ++ layout
│ │ │ └──2.17 MB (01.47%) ++ (4 tiny)
│ │ └──1.16 MB (00.78%) ++ js-zone(0x21964428000)
So at least in this case it's actually Layout and DOM nodes that dominate memory consumption, not the images or javascript.