After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753092 - Add a setting to set a limit to the maximum number of web processes
Add a setting to set a limit to the maximum number of web processes
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Preferences
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-31 08:05 UTC by Carlos Garcia Campos
Modified: 2015-08-03 08:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add a setting to set the maximum number of web processes (3.03 KB, patch)
2015-07-31 08:07 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2015-07-31 08:05:50 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.
Comment 1 Carlos Garcia Campos 2015-07-31 08:07:53 UTC
Created attachment 308517 [details] [review]
Add a setting to set the maximum number of web processes
Comment 2 Bastien Nocera 2015-07-31 08:58:47 UTC
How does it know which tabs to kill and recycle? Does the front-end receive information about that?
Comment 3 Carlos Garcia Campos 2015-07-31 09:40:01 UTC
(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.
Comment 4 Bastien Nocera 2015-07-31 10:02:03 UTC
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?
Comment 5 Carlos Garcia Campos 2015-07-31 10:22:52 UTC
(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.
Comment 6 Michael Catanzaro 2015-07-31 13:05:34 UTC
Patch looks good
Comment 8 Carlos Garcia Campos 2015-08-03 08:59:50 UTC
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.