Bug 221384 - REGRESSION(r267763) Network process launches earlier than before
Summary: REGRESSION(r267763) Network process launches earlier than before
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-03 23:08 PST by Alex Christensen
Modified: 2021-03-03 23:37 PST (History)
2 users (show)

See Also:


Attachments
patch (9.26 KB, patch)
2021-02-03 23:22 PST, Alex Christensen
cdumez: review+
cdumez: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-02-03 23:08:32 PST
This is a performance regression in the launch time of apps that use WebKit.
Comment 1 Alex Christensen 2021-02-03 23:22:02 PST
Created attachment 419242 [details]
patch
Comment 2 Chris Dumez 2021-02-04 08:30:23 PST
Comment on attachment 419242 [details]
patch

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

r=me with a comment.

> Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:590
> +    if (!m_networkProcess)

I am not convinced about this particular part of the change. This gets called when the WebProcess finishes launching. I believe we usually have a network process by this point but if we don't, I am not convinced returning early is the right thing to do here. It means we wouldn't send the XPCEndpoint to the process. What makes sure we send the XPC endpoint to the process when the network process actually launches?

I cannot find such logic. Note that there may be a pre-existing bug here when the network process relaunches due to a crash. I am not quite sure what is XPCEndpoint is used for, so maybe it's not a big deal.
Comment 3 Alex Christensen 2021-02-04 09:33:48 PST
You're right.  That's called after WebProcessPool::prewarmProcess which is the point after the app has "launched", which is beyond the point at which we care whether we have delayed the network process launch, and it's also beyond the point at which we can delay the launch any more because we have a web process that is requesting a connection.  I'll omit that part.
Comment 4 Alex Christensen 2021-02-04 10:10:56 PST
http://trac.webkit.org/r272376
Comment 5 Radar WebKit Bug Importer 2021-02-04 10:11:14 PST
<rdar://problem/73986584>