Bug 192772 - Regression(r239182) SuspendedPage's process reuse for link navigation optimization sometimes broken
Summary: Regression(r239182) SuspendedPage's process reuse for link navigation optimiz...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 192668
  Show dependency treegraph
 
Reported: 2018-12-17 13:07 PST by Chris Dumez
Modified: 2018-12-18 07:27 PST (History)
6 users (show)

See Also:


Attachments
Patch (14.57 KB, patch)
2018-12-17 14:43 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>