Bug 170042

Summary: Make inactive web processes behave as though under memory pressure.
Product: WebKit Reporter: Andreas Kling <kling>
Component: Web Template FrameworkAssignee: Andreas Kling <kling>
Status: REOPENED ---    
Severity: Normal CC: benjamin, buildbot, cdumez, cmarcelo, commit-queue, dbates, kling, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar, Performance
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for relanding none

Description Andreas Kling 2017-03-23 19:38:27 PDT
Let's try to minimize the memory impact of inactive processes.
Comment 1 Andreas Kling 2017-03-23 19:40:05 PDT
Created attachment 305259 [details]
Patch
Comment 2 Antti Koivisto 2017-03-23 19:48:31 PDT
Comment on attachment 305259 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=305259&action=review

> Source/WTF/wtf/MemoryPressureHandler.cpp:196
> +bool MemoryPressureHandler::isUnderMemoryPressure()

This should be renamed (to something like isInMemorySavingMode() perhaps) since we now have many ways for this to become true that have nothing to do with memory pressure.
Comment 3 WebKit Commit Bot 2017-03-24 09:45:11 PDT
Comment on attachment 305259 [details]
Patch

Clearing flags on attachment: 305259

Committed r214351: <http://trac.webkit.org/changeset/214351>
Comment 4 WebKit Commit Bot 2017-03-24 09:45:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Andreas Kling 2017-03-24 09:54:51 PDT
<rdar://problem/31038445>
Comment 6 Ryan Haddad 2017-03-24 13:45:25 PDT
Reverted r214351 for reason:

This change caused API test WebKit1.DidCreateJavaScriptContextBackForwardCacheTest to fail.

Committed r214370: <http://trac.webkit.org/changeset/214370>
Comment 7 Ryan Haddad 2017-03-24 13:45:34 PDT
*** Bug 170069 has been marked as a duplicate of this bug. ***
Comment 8 Andreas Kling 2017-04-05 14:45:19 PDT
Created attachment 306320 [details]
Patch for relanding
Comment 9 WebKit Commit Bot 2017-04-05 15:55:28 PDT
Comment on attachment 306320 [details]
Patch for relanding

Clearing flags on attachment: 306320

Committed r214974: <http://trac.webkit.org/changeset/214974>
Comment 10 WebKit Commit Bot 2017-04-05 15:55:30 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Chris Dumez 2017-06-06 20:47:05 PDT
Reverted r214974 for reason:

Causes some tabs to start using a huge amount of CPU after 8 minutes in the background

Committed r217872: <http://trac.webkit.org/changeset/217872>