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

Issue 1189133003: Ensure that the wake up timer set by the UI worker thread in the UI message pump on Windows is set …

Created:
5 years, 6 months ago by ananta
Modified:
5 years, 6 months ago
Reviewers:
scottmg, brucedawson
CC:
chromium-reviews, erikwright+watch_chromium.org, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Ensure that the wake up timer set by the UI worker thread in the UI message pump on Windows is set once in each iteration. Currently the wake up timer is set by the UI worker thread continuosly which causes the thread to wake up needlessly thus triggering CPU usage. Fix is to set the timer from the worker thread once during each iteration. BUG=500749

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -2 lines) Patch
M base/message_loop/message_pump_win.h View 1 chunk +5 lines, -0 lines 2 comments Download
M base/message_loop/message_pump_win.cc View 4 chunks +7 lines, -2 lines 2 comments Download

Messages

Total messages: 6 (2 generated)
ananta
5 years, 6 months ago (2015-06-18 13:51:44 UTC) #2
scottmg
5 years, 6 months ago (2015-06-18 18:00:03 UTC) #4
brucedawson
See my comments on the code for one possible change to a comment, but not ...
5 years, 6 months ago (2015-06-19 21:09:02 UTC) #5
ananta
5 years, 6 months ago (2015-06-19 22:19:10 UTC) #6
https://codereview.chromium.org/1189133003/diff/1/base/message_loop/message_p...
File base/message_loop/message_pump_win.cc (right):

https://codereview.chromium.org/1189133003/diff/1/base/message_loop/message_p...
base/message_loop/message_pump_win.cc:444: // timeBeginPeriod API being called.
On 2015/06/19 21:09:01, brucedawson wrote:
> "is dependent on the current global timer precision and therefore depends on
> whether Chrome or any other process has raised the timer frequency with
> timeBeginPeriod."

Done.

https://codereview.chromium.org/1189133003/diff/1/base/message_loop/message_p...
File base/message_loop/message_pump_win.h (right):

https://codereview.chromium.org/1189133003/diff/1/base/message_loop/message_p...
base/message_loop/message_pump_win.h:178: long force_fallback_timer_for_tasks_;
On 2015/06/19 21:09:01, brucedawson wrote:
> I believe we are now allowed to use in-place initialization. If so this could
be
> tagged with "= 0;" instead of having to modify the constructor. I'm a huge
fan.
> 
> FWIW.

Leaving this as is for consistency for now.

Powered by Google App Engine
This is Rietveld 408576698