GNOME Bugzilla – Bug 753092
Add a setting to set a limit to the maximum number of web processes
Last modified: 2015-08-03 08:59:58 UTC
Some people keep using shared-secondary-process model because the one-secondary-process-per-web-view requires too many resources when it has a lot of tabs open. Now webkit has API to set a limit to the amount of web processes created by a web context at the same time. We could use it to set a limit that the user can set from gsettings.
Created attachment 308517 [details] [review] Add a setting to set the maximum number of web processes
How does it know which tabs to kill and recycle? Does the front-end receive information about that?
(In reply to Bastien Nocera from comment #2) > How does it know which tabs to kill and recycle? Does the front-end receive > information about that? No, we don't know that. When a new process is requested to be created, it checks the limit, if there's room for new process it's created. Otherwise it reuses the existing web process with fewer pages. But it never kills tabs, you can't change this setting at runtime, like the process model, it's set once and can't change.
Ha, understood. Can we determine how many max web processes we should be using based on the available RAM, or do we want to have a set number? Should this be the default to conserve memory until we're able to choose which of the tabs to kill a-la Safari on iOS or Web on the RPi?
(In reply to Bastien Nocera from comment #4) > Ha, understood. Can we determine how many max web processes we should be > using based on the available RAM, or do we want to have a set number? Should > this be the default to conserve memory until we're able to choose which of > the tabs to kill a-la Safari on iOS or Web on the RPi? I hadn't thought about using a dynamic limit. I guess you mean the available RAM when the browser is launched, because as I said we can't change the limit. That could be a problem if when you open ephy, there's another app using a lot of RAM that you close later, for example, or the other way around. For now I think you could try with different values and see how it works for you.
Patch looks good
The ideal solution: http://arstechnica.com/gadgets/2015/07/chrome-tests-discarding-background-tabs-to-save-memory/
Comment on attachment 308517 [details] [review] Add a setting to set the maximum number of web processes Pushed to git master, also bumping WebKit requirements to use the new API.