Live data from Hacker News

Why are browsers so slow?

ilyabirman.net

231–240 of 376 posts

Re: Why are browsers so slow?

#231

Earlier quoted context omitted.

400 tabs. Including several active fancy SPAs, like gMail and two copies of Slack, a gDocs or two, sometimes the godawful work LMS. Stock Firefox 50 (32bit), untweaked with no relevant add-ons (well, except AdBlock Plus), Windows 10, just over 400 tabs open, under 10% CPU, under 2GB of RAM (on a 16GB machine). If I freak it out by doing a bunch of flipping through dormant tabs, I can spike CPU pretty good as it does…

>400 tabs >like gMail and two copies of Slack, a gDocs or two, sometimes the godawful work LMS. >under 10% CPU, under 2GB of RAM Any proofs? Stock firefox can't go further than 100 tabs, and you can't do literally anything else on your computer at that time.

> Stock firefox can't go further than 100 tabs

about:tabs (see https://addons.mozilla.org/en-US/firefox/addon/tab-stats/ ) is showing me "151 tabs" and "57 tabs have been loaded" for my current session. The other 90-some I haven't looked at this session, so they're left unloaded. I can post a screenshot, but I could fake that just as easily as I could fake my claims above, so it's not any more "proof".

I'm certainly doing other things right now (e.g. compiling).

It _really_ depends on what you have in your 100 tabs. If you have 100 copies of gmail, you're more likely to have a bad time than if you have 100 sane pages. ;)

Re: Why are browsers so slow?

#232
What happened to the performance of the 'back' button?

Pressing 'back' used to be quick, on the modern web its rather sluggish, like it re-loads the old page from scratch.

I can forgive sites that are implemented as single page with their own 'fake' URLs (though that is still annoying). But even static content.

Given the emphasis on browsers handling lots of tabs I'm surprised 'back' isn't implemented by, effectively, keeping the old page around for a bit and pausing its Javascript, then just picking up where you left off.

Re: Why are browsers so slow?

#233

Has the author tried https://vivaldi.com/ (started from the remnants of original opera I believe)

It's literally just Chrome, with a different chrome (UI) and some new features in the UI. You're not going to get anything faster than Chrome if it uses the same engine (Blink).

The post is not about the performance of rendering pages, it's about the UI. So recommending a browser that uses a different UI seems reasonable.

Re: Why are browsers so slow?

#234

All of these anecdotal benchmarks people are doing are silly because you're overlooking so much detail: * SSD or slow spinning disk (makes a massive difference if your computer is swapping out tabs to cache). * Have the tabs been loaded or not (a new browser session will open placeholders for the tabs without loading the site, but an older session will likely have dozens -if not more- of those sites loaded) * Fronten…

If you have 100 tabs doubtfully all of them are relevant. That's more like a user problem.

It's an easy habit to make though. Like why some people have lots of stuff saved to their Windows desktop, or messy desks with paperwork from a dozen different projects arranged in a way that only the person sat at that desk could understand. I doubt many people set out to work that way, it's more a symptom of the "I'll leave that there and come back to it when I get more time" mindset. Except unfortunately one never finds the time.

I can't really blame people for doing that given our hectic modern lives.

Re: Why are browsers so slow?

#235

Earlier quoted context omitted.

My worst problems were with Toptal's website. I even tweeted them about it, but it still leaked memory like crazy. Maybe they fixed it already, but I wouldn't know - they didn't have articles that interest me in a while. Anyway. I have Firefox with uBlock, on Archlinux. With JS disabled. 400MB, about a hundred tabs. I do recommend using it that way. I also have Chromium, for things that require JS - youtube, facebook…

How can a site leak memory? Javascripts is garbage-collected.

Easy: add it to something that's alive while the site is alive. Here's an example that leaks some memory every 100ms while you have the site open:

  window.leakyArr = [];
  function leakStuff() {
    leakyArr.push("This is leaked" + Math.random());
  }
  setInterval(leakStuff, 100);
Of course if you unload the page this will all be collected. But if you have a page you leave open for a long time and it does stuff like this, it's possible for the page to use hundreds of megabytes of RAM. In fact, twitter does just that if you leave it open for a day or three, for reasons more or less like the above: they're showing or caching all the stuff that came in since you opened the page. That's more and more stuff as time goes on.

Re: Why are browsers so slow?

#236

> But I remember the times when we had the amazing Opera browser. In Opera, I could have a hundred open tabs, and it didn’t care, it worked incredibly fast on the hardware of its era, useless today. You may ask: why would a sane person want a hundred open tabs, how would you even manage that? Well, Opera has had a great UI for that, which nobody has ever matched. Working with a hundred tabs in Opera was much easier b…

that's Ilia Birman. He have all his blog written with this set of mind. God knows why people read him and why they share articles like this.

Re: Why are browsers so slow?

#237
post #232

What happened to the performance of the 'back' button? Pressing 'back' used to be quick, on the modern web its rather sluggish, like it re-loads the old page from scratch. I can forgive sites that are implemented as single page with their own 'fake' URLs (though that is still annoying). But even static content. Given the emphasis on browsers handling lots of tabs I'm surprised 'back' isn't implemented by, effectively…

That's an issue with the site not having the correct caching headers. If it's static content with the correct caching headers defined then the browser should just load it from cache.

Re: Why are browsers so slow?

#238

> But I remember the times when we had the amazing Opera browser. In Opera, I could have a hundred open tabs, and it didn’t care, it worked incredibly fast on the hardware of its era, useless today. You may ask: why would a sane person want a hundred open tabs, how would you even manage that? Well, Opera has had a great UI for that, which nobody has ever matched. Working with a hundred tabs in Opera was much easier b…

Firefox is a nice workhorse. Lots to like about it. One problem is the GUI latency. Between Chrome instantaneous response and Firefox jitter I always end up back to Chrome.

Re: Why are browsers so slow?

#239
post #88

Earlier quoted context omitted.

You forget that webpages are allowed to do what ever the hell they want, and so each is probably running a script or two in the background. We put up with a lot in webapps that would never stand in a desktop app.

I don't forget, I just don't forgive. It's unacceptable either way. Someone has to take responsibility---might as well start with the browser. Then we can push it down from there; maybe if browsers were held accountable for pages' resource usage they'd implement resource controls. Like they currently do with limiting setTimeout on inactive pages, but more comprehensively. And maybe they'd implement better inspection…

> Like they currently do with limiting setTimeout on inactive pages, but more comprehensively.

Firefox is working on this. Doing it without breaking things like music streaming sites is ... delicate.

Re: Why are browsers so slow?

#240

Unimaginative, non-technical rant. Please find the bottlenecks, and provide a technical solution. The code is open source for you to read, and your patch will be constructive and helpful. Your idealist blog-post, not really that helpful.

the bottlenecks here are systemic, part of the wider "web development" mentality, rather than technical parts of browsers.

build and use sites that template html, without js / huge styling, like HN or pinboard, and I promise you everything will be lightning fast

Post reply on HN