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
Patch (4.94 KB, patch)
2020-06-28 16:33 PDT, Geoffrey Garen
no flags
Patch (2.94 KB, patch)
2020-06-28 21:28 PDT, Geoffrey Garen
no flags
Patch (2.98 KB, patch)
2020-06-30 21:54 PDT, Geoffrey Garen
no flags
Patch (7.01 KB, patch)
2020-07-01 21:24 PDT, Geoffrey Garen
no flags
Patch (8.88 KB, patch)
2020-07-02 15:34 PDT, Geoffrey Garen
no flags
Geoffrey Garen
Comment 1 2020-06-28 16:06:25 PDT
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
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
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
Geoffrey Garen
Comment 10 2020-07-01 21:24:48 PDT
Geoffrey Garen
Comment 11 2020-07-02 15:34:39 PDT
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
Note You need to log in before you can comment on or make changes to this bug.