News for hackers. Stuff that matters.
Re:Why are browsers so slow? by timonovici on Wednesday December 21, 2016 @04:36AM (#13227880)
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 and the like.

Re:Why are browsers so slow? by kutkloon7 on Wednesday December 21, 2016 @06:08AM (#13228248)
How can a site leak memory? Javascripts is garbage-collected.
Re:Why are browsers so slow? by bzbarsky on Wednesday December 21, 2016 @06:17AM (#13228283)
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.