(Disclaimer: V8 dev) This post is unfortunately nonsense, because it's making a fundamental measurement error: not including renderer processes for Safari, and only measuring the browser process (which should be expected to be roughly O(1) memory in the number of tabs). To the author's credit, they _are trying_ to include child processes - I'm not sure why, but `psrecord` seems to not (in local testing) include child…
OK, but the situation still looks shameful. What exactly prohibits a web site from consuming all my RAM? I have never once seen a browser make a misbehaving site wait (frozen with no CPU) for me to confirm that sucking up more RAM is acceptable to me. What happens instead is that I hit a wall of slowness, forcing me to press the power button and lose all my other work. It's not very gradual, I think due to the nature…
Isn't that what Firefox's "a tab may be slowing down your computer" (or equivalent) is doing? However it does not seem to trigger reliably. Good thing for me i disable JavaScript most times!
> I hit a wall of slowness, forcing me to press the power button and lose all my other work
So that's two parallel problems. First is browser is eating too much RAM. Second is OS starts writing to swap instead of triggering OOM killer, rendering the whole system unusable rather quickly. I personally systematically disable swap on laptops/desktops (but keep it on server).
Ideally, client-side scripting in the browser wouldn't be a thing at all (we'd have established, reproducible, secure software distribution mechanisms like guix's introduction channels). In a better world, a browser would for every page disable Javascript/WASM by default, but have a convenient menu (alla Noscript) to choose between different security/performance profiles: webapp for unlimited resources/permissions, simple for basic JS for minor interactions (like LibreJS does), etc..
In our world, the websites we consume decide what resources they're gonna eat, and how much network resources they're gonna load, leading to unexpected CPU/RAM/network usage (inducing €€€€ bills for cell phone data).