this post was submitted on 13 Dec 2024
274 points (98.9% liked)

Open Source

31679 readers
813 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Tehdastehdas@lemmy.world 2 points 5 days ago (1 children)

...which should be used only when the browser is running out of memory.

[–] bruce965@lemmy.ml 1 points 5 days ago

Well... that would make sense. But it's much much easier to just do it preemptively. The browser API to check how much memory is available are quite limited afaik. Also if there are too many elements the browser will have to do more work when interacting with the page (i.e. on every rendered frame), thus wasting slightly more power and in a extreme cases even lagging.

For what it's worth, I, as a web developer, have done it too in a couple occasions (in my case it was absolutely necessary when working with a 10K × 10K table, way above what a browser is designed to handle).