News for hackers. Stuff that matters.
Re:Multi-process Firefox brings 400-700% improvement in resp... by reitanqild on Tuesday September 06, 2016 @04:49PM (#12439198)
>> by being able to mark tabs as "no background activity allowed"

> What if you spent a few hours filling out some government form online, then you went and took a break by watching a few YouTube videos? Memory usage might spike up, and the browser decides to unload the tab with the form. You'd be mad if form state got lost when you switched back.

GP is talking about actively marking tabs as "no background activity allowed".

I have been searching in vain for something like that: stop scripts in background tabs except for specifically whitelisted pages.

There is absolutely no reason that I can see why every website and their ads should be allowed to roam around freely in the background.

There is however a number of reason why they should not be allowed. Battery life and phishing attempts readily comes to mind.

I guess whoever comes up with a well-working extension for that can easily ask me for USD 30 or even 40 and expect me to be a walking billboard for it ;-)

Re:Multi-process Firefox brings 400-700% improvement in resp... by yoasif_ on Tuesday September 06, 2016 @05:22PM (#12439391)
> I have been searching in vain for something like that: stop scripts in background tabs except for specifically whitelisted pages.

Have you tried UnloadTab?

https://addons.mozilla.org/en-US/firefox/addon/unloadtab/

Re:Multi-process Firefox brings 400-700% improvement in resp... by reitanqild on Wednesday September 07, 2016 @10:26AM (#12443634)
Ok. Will try. I think I see an issue here where I want to go back to a tab I have open on the train home.

If it is unloaded that means I have to connect to the Internet again to get hold of my page again?

(I'd think what I want is just to pause any javascript or other processing from any webpage that us not focused in the browser and not specifically whitelisted.)

Re:Multi-process Firefox brings 400-700% improvement in resp... by mccr8 on Tuesday September 06, 2016 @05:21PM (#12439381)
Background tabs already have their timers run less frequently. In Firefox, that was added in 2011 [1]. Certainly further improvements to reduce background tab activity would be nice. One way you can sort of get that effect is to use Reader Mode, on pages where that works.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=633421

Re:Multi-process Firefox brings 400-700% improvement in resp... by juandazapata on Tuesday September 06, 2016 @08:05PM (#12440141)
Or you can buy 2GB of RAM with those $30
Re:Multi-process Firefox brings 400-700% improvement in resp... by nirvdrum on Tuesday September 06, 2016 @08:44PM (#12440289)
We've reached a point where a lot of consumer hardware simply can't be upgraded. The ideal of just adding more RAM isn't possible (or perhaps practical in many cases). MBPs can't be upgraded at all these days. My Lenovo laptop can, but going 16 GB -> 32 GB requires far more than $30 since I'd need to buy 16 GB SODIMMs.

That's also a bit beside the point. I have a workstation with 48 GB RAM. I left a browser running in the background and had one tab consume 20 GB on its own before I killed it. Many of these leaks seem to just be unbounded memory growth, so that hypothetical 2 GB you add is going to be eaten up in short order anyway.

Re:Multi-process Firefox brings 400-700% improvement in resp... by brokenmachine on Wednesday September 07, 2016 @01:00AM (#12441049)
The scenario you describe with one tab using 20Gb is "beside the point" and certainly an exceptional situation. I've never seen that happen... I think I've had one Firefox crash this year, and that time it wasn't using all the RAM - it was hogging 100% CPU instead.

Of course the extra 2Gb might help for someone with less than 48Gb in their machine (most of us!).

Re:Multi-process Firefox brings 400-700% improvement in resp... by nirvdrum on Wednesday September 07, 2016 @01:24AM (#12441113)
Well, my point more was apps/sites that go sideways will eat as much RAM as they're allowed to. The 20 GB case was only special in that the leak rate was much higher than most. On a smaller scale, whenever my laptop fan kicked on, I knew I left a Travis tab open in the background somewhere. That was the CPU going into an aggressive GC loop due to the relatively huge amount of memory being used (2 - 4 GB).

But my original point is really that dismissing gross memory usage by saying you can buy more RAM for cheap is no longer accurate. In many cases, your machine's configuration is unchangeable. Getting an extra 2 GB RAM isn't $30, it's the cost of a brand new device. In other cases, where you might have configurable hardware, you often have to buy the largest capacity chip available and the economics get skewed. For SODIMMS, going 8 GB -> 16 GB is reasonably cheap, 16 GB -> 32 GB is fairly expensive.

I'd argue having to do a hardware upgrade for a web app in the first place is a bit silly. There's often very little reason for these apps to be so large in the first place.

Re:Multi-process Firefox brings 400-700% improvement in resp... by reitanqild on Wednesday September 07, 2016 @08:03AM (#12442594)
It's not the RAM for me (I have 16GB).

It is about things like harrassing my CPU multiple times a minute after my search results have loaded (looking angrily at you googlers, google was the worst offender here it seems! (Windows 10, FF))

Re:Multi-process Firefox brings 400-700% improvement in resp... by roel_v on Wednesday September 07, 2016 @03:09AM (#12441389)
More memory doesn't help. I have 64gb and still need to close ff every few days. (Granted I do keep 50-100 tabs open at all times).