| Summary: | [WPE][GTK] Should enable WebProcessCache | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||||
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | aperez, berto, bugs-noreply, cdumez, cgarcia, ews-watchlist, gustavo, mcatanzaro | ||||||
| Priority: | P2 | ||||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Attachments: |
|
||||||||
|
Description
Michael Catanzaro
2020-12-09 08:34:27 PST
If you have Process-Swap-On-Navigation (PSON) enabled, then I think you'd definitely want the process cache too. Note that Apple only enables the process-cache on desktop (not mobile) due to memory constraints. Yeah of course we have PSON. That has been enabled for ages now. I think nobody realized that the process cache had to be enabled separately. (In reply to Chris Dumez from comment #1) > If you have Process-Swap-On-Navigation (PSON) enabled, then I think you'd > definitely want the process cache too. Note that Apple only enables the > process-cache on desktop (not mobile) due to memory constraints. Currently we have a chassis type check that could be used for this, but it doesn't work reliably due to bug #218122, and is currently only used to set a mobile user agent header. It would probably make more sense to enable or disable the cache based on total available RAM, rather than checking form factor, since there's not really any difference between a mobile phone with 3 GB RAM (Librem 5) and a desktop with 3 GB RAM. The performance hit if you run out of RAM is going to be bad either way. (In reply to Michael Catanzaro from comment #3) > (In reply to Chris Dumez from comment #1) > > If you have Process-Swap-On-Navigation (PSON) enabled, then I think you'd > > definitely want the process cache too. Note that Apple only enables the > > process-cache on desktop (not mobile) due to memory constraints. > > Currently we have a chassis type check that could be used for this, but it > doesn't work reliably due to bug #218122, and is currently only used to set > a mobile user agent header. > > It would probably make more sense to enable or disable the cache based on > total available RAM, rather than checking form factor, since there's not > really any difference between a mobile phone with 3 GB RAM (Librem 5) and a > desktop with 3 GB RAM. The performance hit if you run out of RAM is going to > be bad either way. Yes, Apple port listen to memory pressure warnings and kill those cached processes as necessary. I thought it was enabled. I'll submit a patch. Created attachment 415860 [details]
Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API Comment on attachment 415860 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=415860&action=review > Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:394 > + configuration.setUsesWebProcessCache(true); I think it's fine to land this as-is, but depending on things go we might need to either add some smarts to choose a sensible default for this and/or add API to WebKitWebContext to toggle it. The GTK API EWS is red. Score +1 for whoever set up that EWS bot. That is nice to have.... Created attachment 416146 [details]
Patch for landing
Committed r270767: <https://trac.webkit.org/changeset/270767> |