Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Issue 331513002: [Mac] Use a native MessagePump instead of a MessagePumpDefault (Closed)

Created:
6 years, 6 months ago by jeremy
Modified:
6 years, 6 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, sadrul, tonyg
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

[Mac] Use a native MessagePump instead of a MessagePumpDefault Many message loops in Chrome are backed by MessagePumpDefault which uses a WaitableEvent object to sleep, this is ultimately implemented as a pthread condition variable on POSIX. In order to support timer coalescing in MessageLoops we need to sleep using a primitive which supports timer coalescing at the OS level (support for timer coalescing goes down into the kernel on Android/Linux/OSX/Win). The current change achieves this and should provide a way to gauge the effect of timer coalescing. An alternate approach to this patch would be to implement MessagePumpDefault using a primitive which supports timer coalescing. Local performance tests didn't uncover any regressions from this change. BUG=356804 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276808

Patch Set 1 #

Total comments: 1

Patch Set 2 : Change to use a MessagePumpCFRunLoop #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -1 line) Patch
M base/message_loop/message_loop.cc View 1 2 chunks +9 lines, -1 line 1 comment Download

Messages

Total messages: 21 (0 generated)
jeremy
6 years, 6 months ago (2014-06-11 21:53:56 UTC) #1
Mark Mentovai
Scary, but LGTM in a “let’s try and see what happens” sort of way. Consider ...
6 years, 6 months ago (2014-06-11 21:59:42 UTC) #2
jeremy
The CQ bit was checked by jeremy@chromium.org
6 years, 6 months ago (2014-06-11 22:45:40 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/331513002/20001
6 years, 6 months ago (2014-06-11 22:46:47 UTC) #4
darin (slow to review)
I'm a little nervous about this change. There is a bug open to actually stop ...
6 years, 6 months ago (2014-06-12 00:05:54 UTC) #5
darin (slow to review)
What does "an alternate approach to this patch would be to implement MessagePumpDefault using a ...
6 years, 6 months ago (2014-06-12 00:07:19 UTC) #6
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 6 months ago (2014-06-12 00:10:16 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-12 00:11:53 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/mac_chromium_compile_dbg/builds/31490) mac_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/mac_chromium_rel/builds/38179)
6 years, 6 months ago (2014-06-12 00:11:55 UTC) #9
Mark Mentovai
The NSRunLoop shouldn’t be harmful in the renderers. It was important to get rid of ...
6 years, 6 months ago (2014-06-12 01:55:13 UTC) #10
darin (slow to review)
Background: My goal is to move most of our threads to be based on MessagePumpMojo. ...
6 years, 6 months ago (2014-06-12 03:12:00 UTC) #11
Mark Mentovai
Interesting. How do timers work in MessagePumpMojo then? On Wed, Jun 11, 2014 at 11:11 ...
6 years, 6 months ago (2014-06-12 03:50:46 UTC) #12
darin (slow to review)
MojoWaitMany takes a timeout. It is similar to poll, select, WaitForMultipleObjects, etc. -Darin On Wed, ...
6 years, 6 months ago (2014-06-12 03:52:54 UTC) #13
jeremy
As Mark mentions this change is quite minimal and isolated and doesn't increase our reliance ...
6 years, 6 months ago (2014-06-12 15:01:44 UTC) #14
darin (slow to review)
OK, I agree. It'll be interesting to see what benefit this change has. Please CC ...
6 years, 6 months ago (2014-06-12 15:51:52 UTC) #15
jeremy
The CQ bit was checked by jeremy@chromium.org
6 years, 6 months ago (2014-06-12 15:56:33 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jeremy@chromium.org/331513002/20001
6 years, 6 months ago (2014-06-12 15:58:27 UTC) #17
jeremy
Some notes about timer coalescing APIs on various platforms: https://docs.google.com/document/d/1cDpBIrXhjIsKCJMP-gKU8O7KLiYJHa8v4k8CPFvd9bo/edit?usp=sharing
6 years, 6 months ago (2014-06-12 16:23:18 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: ios_rel_device_ninja on tryserver.chromium ...
6 years, 6 months ago (2014-06-12 21:27:00 UTC) #19
commit-bot: I haz the power
Change committed as 276808
6 years, 6 months ago (2014-06-12 21:38:56 UTC) #20
jeremy
6 years, 6 months ago (2014-06-12 23:16:55 UTC) #21
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/336603005/ by jeremy@chromium.org.

The reason for reverting is: Broke Jingle unit tests on the bots..

Powered by Google App Engine
This is Rietveld 408576698