We should add an SPI to kill cached web processes. The intended use case is to add a lukewarm mode to Mac PLT5 in which web pages load in a new WebProcess but load resources from the disk cache. Currently the warm run of PLT5 is small enough to fit inside the Mac's process pool size, so we only end up exercising the memory cache in the cached WebProcess when loading resources.
Created attachment 383584 [details] Patch
Comment on attachment 383584 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383584&action=review > Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm:527 > + bool shouldTerminateCached = process->isInProcessCache() && (type & _WKWebProcessTerminationTypeCached); Calling WebProcessCache::clear() would do the right thing for clearing the process cache. Also, is there really value to clearing the prewarmed process?
Comment on attachment 383584 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383584&action=review > Source/WebKit/ChangeLog:3 > + Add SPI to clear web process cache The patch does more that that.
Created attachment 383630 [details] Patch
Comment on attachment 383630 [details] Patch remove option to kill prewarmed process
Comment on attachment 383630 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383630&action=review > Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm:472 > +- (void)_terminateCachedWebProcesses I would call this _clearWebProcessCache
Created attachment 383636 [details] Patch
Comment on attachment 383636 [details] Patch change method name
Comment on attachment 383636 [details] Patch Clearing flags on attachment: 383636 Committed r252500: <https://trac.webkit.org/changeset/252500>
All reviewed patches have been landed. Closing bug.
<rdar://problem/57239080>