Bug 192772

Summary: Regression(r239182) SuspendedPage's process reuse for link navigation optimization sometimes broken
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, commit-queue, ews-watchlist, ggaren, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 192668    
Attachments:
Description Flags
Patch none

Description Chris Dumez 2018-12-17 13:07:36 PST
SuspendedPage's process reuse for link navigation optimization sometimes broken after r239182. In particular, if the page fails to enter page cache, we now throw away the entire process, which can slow down 'back' navigation to this HistoryItem or link navigations to the same domain.
Comment 1 Chris Dumez 2018-12-17 14:43:23 PST
Created attachment 357479 [details]
Patch
Comment 2 EWS Watchlist 2018-12-17 14:44:55 PST
Attachment 357479 [details] did not pass style-queue:


ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:1795:  Multi-line string ("...") found.  This lint script doesn't do well with such strings, and may give bogus warnings.  They're ugly and unnecessary, and you should use concatenation instead".  [readability/multiline_string] [5]
ERROR: Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:1802:  Multi-line string ("...") found.  This lint script doesn't do well with such strings, and may give bogus warnings.  They're ugly and unnecessary, and you should use concatenation instead".  [readability/multiline_string] [5]
Total errors found: 2 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Antti Koivisto 2018-12-17 23:51:02 PST
Comment on attachment 357479 [details]
Patch

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

> Source/WebKit/ChangeLog:16
> +        Address the issue by keeping the SuspendedPageProxy alive even if the WebPage fails to suspend.
> +        When trying to reuse a SuspendedPageProxy, if the page failed to suspend, reuse its process but
> +        not the suspended page itself.

As you mentioned in the original bug, a separate process cache for domains might be a nicer design. This will do though.
Comment 4 WebKit Commit Bot 2018-12-18 07:26:57 PST
Comment on attachment 357479 [details]
Patch

Clearing flags on attachment: 357479

Committed r239333: <https://trac.webkit.org/changeset/239333>
Comment 5 WebKit Commit Bot 2018-12-18 07:26:59 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-12-18 07:27:26 PST
<rdar://problem/46809841>