WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
213705
RunLoop::dispatch should only call wakeUp when needed
https://bugs.webkit.org/show_bug.cgi?id=213705
Summary
RunLoop::dispatch should only call wakeUp when needed
Geoffrey Garen
Reported
2020-06-28 16:05:09 PDT
RunLoop::dispatch should only call wakeUp when needed
Attachments
Patch
(1.63 KB, patch)
2020-06-28 16:06 PDT
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Patch
(4.94 KB, patch)
2020-06-28 16:33 PDT
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Patch
(2.94 KB, patch)
2020-06-28 21:28 PDT
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Patch
(2.98 KB, patch)
2020-06-30 21:54 PDT
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Patch
(7.01 KB, patch)
2020-07-01 21:24 PDT
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Patch
(8.88 KB, patch)
2020-07-02 15:34 PDT
,
Geoffrey Garen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Geoffrey Garen
Comment 1
2020-06-28 16:06:25 PDT
Created
attachment 403013
[details]
Patch
Geoffrey Garen
Comment 2
2020-06-28 16:09:01 PDT
Comment on
attachment 403013
[details]
Patch Oops! I had planned to remove the functionsHandled behavior separately from this patch -- but it's actually not correct until you do both, since functionsHandled is willing to exit without a wakeUp. :(
Geoffrey Garen
Comment 3
2020-06-28 16:33:11 PDT
Created
attachment 403014
[details]
Patch
Sam Weinig
Comment 4
2020-06-28 17:23:51 PDT
Comment on
attachment 403014
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=403014&action=review
> Source/WTF/ChangeLog:10 > + RunLoop::wakeUp is super expensive (at least on Darwin platforms). Back > + when IndexedDB used RunLoop::dispatch, RunLoop::wakeUp accounted for 15% > + of all database lookup time.
Out of interest (and for the historical record) what makes it so expensive?
Geoffrey Garen
Comment 5
2020-06-28 20:03:25 PDT
Most of the cost seemed to be its usage of pthread mutexes.
Sam Weinig
Comment 6
2020-06-28 20:22:36 PDT
(In reply to Geoffrey Garen from
comment #5
)
> Most of the cost seemed to be its usage of pthread mutexes.
Is "its" here CFRunLoopWakeUp()? Or something we are doing in WTF?
Geoffrey Garen
Comment 7
2020-06-28 21:28:24 PDT
Created
attachment 403027
[details]
Patch
Geoffrey Garen
Comment 8
2020-06-28 21:29:09 PDT
> Is "its" here CFRunLoopWakeUp()? Or something we are doing in WTF?
It's CFRunLoopSourceSignal and CFRunLoopWakeUp.
Geoffrey Garen
Comment 9
2020-06-30 21:54:01 PDT
Created
attachment 403264
[details]
Patch
Geoffrey Garen
Comment 10
2020-07-01 21:24:48 PDT
Created
attachment 403343
[details]
Patch
Geoffrey Garen
Comment 11
2020-07-02 15:34:39 PDT
Created
attachment 403408
[details]
Patch
Geoffrey Garen
Comment 12
2020-07-02 16:16:46 PDT
Comment on
attachment 403408
[details]
Patch Looks like EWS is happy now.
EWS
Comment 13
2020-07-06 10:15:54 PDT
Committed
r263973
: <
https://trac.webkit.org/changeset/263973
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 403408
[details]
.
Radar WebKit Bug Importer
Comment 14
2020-07-06 10:16:18 PDT
<
rdar://problem/65137000
>
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