by crazygringo · 7y ago · 0 comments
But on the other hand, I love the idea of resource-limiting tabs by default, along all of:
- CPU usage (allow an initial burst, but after a few seconds dial down to max ~0.5% of CPU, with additional bursts allowed after any user interaction like click or keyboard)
- Number of HTTP requests (again, initial bursts allowed and in response to user interaction, but radically delay/queue requests for the sites that try to load a new ad every second even after the page has been loaded for 10 minutes)
- Memory usage (probably the hardest one to get right though)
I mean, every so often I've caught things like a Gmail tab in Chrome stuck at using 100% CPU indefinitely because it must be stuck in some infinite JavaScript loop due to a bug, as well as the occasional other random blog that uses constant 50% CPU for no discernable reason... and it would be nicer if this didn't suck up two hours of my laptop's remaining battery time before I discovered it.
If the browser had soft resource limits that just gradually slowed down code execution and HTTP requests to extreme levels, with a discreet pop-up warning in the corner "this site is attempting to use higher than normal resources, click here to allow temporarily/permanently" for the times you're opening a WebGL demo...
...it seems like it would be a big win for users.
What's more interesting to me is the broader economic question. Do users end up flocking to those browsers because it makes the browser more snappy for the other web sites and contexts? Or do they ditch them because they are necessarily slower than browsers that don't? Is this sort of decision, in other words, a sort of suicidal option for browsers?
E.g.
https://www.coindesk.com/firefox-announces-move-to-block-cry...
I know that solution presented in the article didn't work (neither in Firefox nor in Opera), and I know that from a person close to me who is not "technical" but wants to access some sites which slowed down the person's computer (the sites indeed managed to use exactly 100% of the CPU, that means, to use all cores at once, and to contact regularly some other sites with the "coin" in the name). Then, I've shown the person that the JavaScript can be blocked and that the computer is that way completely responsive... and you know the result: even the non-technical persons do what's rational, once they know that they have a choice.
Unlike most of the commenters here, I agree this is a problem that needs to be solved by browsers. JavaScript blockers work but are unnecessarily big hammers.
Granted, those technologies are not as widely used and that limit, if absent, would not inconvenience the user as quickly and easily as CPU/memory hogging does.
Another thing could be to allow the site to read those limits and consider what to load. Kinda like mediaquery.
Funny how Mozilla spent so long trying to make firefox multi process and right after they got there it was decided that we had to throttle these process anyway.