RunLoop::dispatch should only call wakeUp when needed
Created attachment 403013 [details] Patch
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. :(
Created attachment 403014 [details] Patch
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?
Most of the cost seemed to be its usage of pthread mutexes.
(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?
Created attachment 403027 [details] Patch
> Is "its" here CFRunLoopWakeUp()? Or something we are doing in WTF? It's CFRunLoopSourceSignal and CFRunLoopWakeUp.
Created attachment 403264 [details] Patch
Created attachment 403343 [details] Patch
Created attachment 403408 [details] Patch
Comment on attachment 403408 [details] Patch Looks like EWS is happy now.
Committed r263973: <https://trac.webkit.org/changeset/263973> All reviewed patches have been landed. Closing bug and clearing flags on attachment 403408 [details].
<rdar://problem/65137000>