WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 215569
[Cocoa] Avoid waiting for Launch Services on every load
https://bugs.webkit.org/show_bug.cgi?id=215569
Summary
[Cocoa] Avoid waiting for Launch Services on every load
Per Arne Vollan
Reported
2020-08-17 07:20:25 PDT
Currently, we are waiting for the Launch Services database to be present on every load in the WebContent process. It should be sufficient to wait only on the first load.
Attachments
Patch
(2.60 KB, patch)
2020-08-17 07:23 PDT
,
Per Arne Vollan
darin
: review+
Details
Formatted Diff
Diff
Patch
(2.68 KB, patch)
2020-08-17 14:21 PDT
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Patch
(2.68 KB, patch)
2020-08-17 14:29 PDT
,
Per Arne Vollan
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Per Arne Vollan
Comment 1
2020-08-17 07:23:57 PDT
Created
attachment 406715
[details]
Patch
Radar WebKit Bug Importer
Comment 2
2020-08-17 07:25:25 PDT
<
rdar://problem/67242794
>
Darin Adler
Comment 3
2020-08-17 14:13:16 PDT
Comment on
attachment 406715
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406715&action=review
> Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:69 > + static std::once_flag onceFlag; > + std::call_once(onceFlag, [] {
This is a multi-thread-safe way of doing this. Can this be called from multiple threads? If not, a simple global check would suffice.
Per Arne Vollan
Comment 4
2020-08-17 14:16:11 PDT
(In reply to Darin Adler from
comment #3
)
> Comment on
attachment 406715
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=406715&action=review
> > > Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:69 > > + static std::once_flag onceFlag; > > + std::call_once(onceFlag, [] { > > This is a multi-thread-safe way of doing this. Can this be called from > multiple threads? If not, a simple global check would suffice.
No, I don't believe this can be called from multiple threads. Will fix. Thanks for reviewing!
Per Arne Vollan
Comment 5
2020-08-17 14:21:36 PDT
Created
attachment 406742
[details]
Patch
Darin Adler
Comment 6
2020-08-17 14:24:15 PDT
Comment on
attachment 406742
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406742&action=review
> Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:79 > + };
This semicolon is not needed.
Per Arne Vollan
Comment 7
2020-08-17 14:29:12 PDT
(In reply to Darin Adler from
comment #6
)
> Comment on
attachment 406742
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=406742&action=review
> > > Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:79 > > + }; > > This semicolon is not needed.
Thanks, will fix :)
Per Arne Vollan
Comment 8
2020-08-17 14:29:48 PDT
Created
attachment 406743
[details]
Patch
EWS
Comment 9
2020-08-17 14:54:47 PDT
Committed
r265774
: <
https://trac.webkit.org/changeset/265774
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 406743
[details]
.
Chris Dumez
Comment 10
2020-10-02 11:27:01 PDT
Comment on
attachment 406743
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406743&action=review
> Source/WebKit/ChangeLog:10 > + increase the maximum wait time from 1s to 5s.
I don't think we are ever OK with hanging for 5 seconds. As a matter of fact, during this database update, the process is not processing incoming IPC anymore and gets reported as unresponsive to the client after 3 seconds. Clients such as mail kill the process right away which means that we hung but don't see the time out logging (because the process was terminated before reaching the timeout). There are 2 issues here: 1. We should not be hanging in the first place 2. The 5 seconds timeout is too long. I'd suggest 1 or 2 seconds, something definitely below the 3 second timeout the UIProcess ResponsivenessTimer uses.
Darin Adler
Comment 11
2020-10-02 11:34:36 PDT
Comment on
attachment 406743
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406743&action=review
>> Source/WebKit/ChangeLog:10 >> + increase the maximum wait time from 1s to 5s. > > I don't think we are ever OK with hanging for 5 seconds. As a matter of fact, during this database update, the process is not processing incoming IPC anymore and gets reported as unresponsive to the client after 3 seconds. Clients such as mail kill the process right away which means that we hung but don't see the time out logging (because the process was terminated before reaching the timeout). > > There are 2 issues here: > 1. We should not be hanging in the first place > 2. The 5 seconds timeout is too long. I'd suggest 1 or 2 seconds, something definitely below the 3 second timeout the UIProcess ResponsivenessTimer uses.
Change it back to the 1 second it was before this patch?
Per Arne Vollan
Comment 12
2020-10-02 11:53:34 PDT
(In reply to Chris Dumez from
comment #10
)
> Comment on
attachment 406743
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=406743&action=review
> > > Source/WebKit/ChangeLog:10 > > + increase the maximum wait time from 1s to 5s. > > I don't think we are ever OK with hanging for 5 seconds. As a matter of > fact, during this database update, the process is not processing incoming > IPC anymore and gets reported as unresponsive to the client after 3 seconds. > Clients such as mail kill the process right away which means that we hung > but don't see the time out logging (because the process was terminated > before reaching the timeout). > > There are 2 issues here: > 1. We should not be hanging in the first place
Yes. This seems to be caused by the entitlement check for "com.apple.private.webkit.use-xpc-endpoint" failing. I am currently looking into this.
> 2. The 5 seconds timeout is too long. I'd suggest 1 or 2 seconds, something > definitely below the 3 second timeout the UIProcess ResponsivenessTimer uses.
That sounds good, I will change that. Thanks for reviewing!
Per Arne Vollan
Comment 13
2020-10-02 11:54:00 PDT
(In reply to Darin Adler from
comment #11
)
> Comment on
attachment 406743
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=406743&action=review
> > >> Source/WebKit/ChangeLog:10 > >> + increase the maximum wait time from 1s to 5s. > > > > I don't think we are ever OK with hanging for 5 seconds. As a matter of fact, during this database update, the process is not processing incoming IPC anymore and gets reported as unresponsive to the client after 3 seconds. Clients such as mail kill the process right away which means that we hung but don't see the time out logging (because the process was terminated before reaching the timeout). > > > > There are 2 issues here: > > 1. We should not be hanging in the first place > > 2. The 5 seconds timeout is too long. I'd suggest 1 or 2 seconds, something definitely below the 3 second timeout the UIProcess ResponsivenessTimer uses. > > Change it back to the 1 second it was before this patch?
Yes, I will change it back to 1 second. Thanks for reviewing!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug