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

Issue 2162143002: Don't use PostTask queueing between compositor and main thread. (Closed)

Created:
4 years, 5 months ago by dtapuska
Modified:
4 years, 4 months ago
Reviewers:
tdresser
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, jam, dtapuska+chromiumwatch_chromium.org, dglazkov+blink, darin-cc_chromium.org, blink-reviews, blink-reviews-api_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't use PostTask queueing between compositor and main thread. Instead put the events in the main thread event queue where they can be coalesced. This improves the latency on mouse move events ~5-7X On Linux loading https://jsfiddle.net/va5vpxLz/6/ and getting ~250 mouse samples Stable (RAF) 53.579747191011386 Stable (setTimeout) 27.226215139442306 With Change (RAF) 7.244861660078827 With Change (setTimeout) 5.327854330708663 BUG=624012, 599152 Committed: https://crrev.com/4d87f4e9da90c5fdc94ad48cd6b5c888ef8bd896 Cr-Commit-Position: refs/heads/master@{#410487}

Patch Set 1 #

Patch Set 2 : Fix android build and unit tests #

Patch Set 3 : Don't ack mouse move right away send them unthrottled #

Total comments: 29

Patch Set 4 : Rebase #

Total comments: 10

Patch Set 5 : Add browser test, fix comments from #4 #

Total comments: 23

Patch Set 6 : Address issues with test and fix dchecks in debug mode #

Total comments: 2

Patch Set 7 : Fix fairness of post tasks it was causing some tests to fail #

Unified diffs Side-by-side diffs Delta from patch set Stats (+534 lines, -322 lines) Patch
M content/browser/renderer_host/input/input_router_impl.h View 1 2 1 chunk +6 lines, -10 lines 0 comments Download
M content/browser/renderer_host/input/input_router_impl.cc View 1 2 3 6 chunks +10 lines, -32 lines 0 comments Download
A content/browser/renderer_host/input/main_thread_event_queue_browsertest.cc View 1 2 3 4 5 6 1 chunk +197 lines, -0 lines 0 comments Download
M content/common/input/input_event_dispatch_type.h View 1 1 chunk +1 line, -4 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/input/input_event_filter.h View 2 chunks +5 lines, -5 lines 0 comments Download
M content/renderer/input/input_event_filter.cc View 1 2 3 4 5 4 chunks +16 lines, -13 lines 0 comments Download
M content/renderer/input/input_event_filter_unittest.cc View 1 2 3 4 5 12 chunks +16 lines, -71 lines 0 comments Download
M content/renderer/input/input_handler_manager.h View 1 chunk +0 lines, -4 lines 0 comments Download
M content/renderer/input/input_handler_manager.cc View 1 chunk +1 line, -17 lines 0 comments Download
M content/renderer/input/input_handler_manager_client.h View 2 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/input/main_thread_event_queue.h View 1 2 3 4 5 6 4 chunks +37 lines, -22 lines 0 comments Download
M content/renderer/input/main_thread_event_queue.cc View 1 2 3 4 5 6 3 chunks +64 lines, -50 lines 0 comments Download
M content/renderer/input/main_thread_event_queue_unittest.cc View 1 2 3 4 5 6 7 chunks +174 lines, -87 lines 0 comments Download
M content/renderer/input/render_widget_input_handler.cc View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download

Messages

Total messages: 48 (31 generated)
dtapuska
Tim please take a look at this
4 years, 5 months ago (2016-07-19 19:57:59 UTC) #4
tdresser
Some nits and some questions. https://codereview.chromium.org/2162143002/diff/40001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/2162143002/diff/40001/content/browser/renderer_host/input/input_router_impl.cc#newcode191 content/browser/renderer_host/input/input_router_impl.cc:191: mouse_move_queue_.push_back(mouse_event); Don't we still ...
4 years, 5 months ago (2016-07-20 20:52:28 UTC) #15
dtapuska
https://codereview.chromium.org/2162143002/diff/40001/content/browser/renderer_host/input/input_router_impl.cc File content/browser/renderer_host/input/input_router_impl.cc (right): https://codereview.chromium.org/2162143002/diff/40001/content/browser/renderer_host/input/input_router_impl.cc#newcode191 content/browser/renderer_host/input/input_router_impl.cc:191: mouse_move_queue_.push_back(mouse_event); On 2016/07/20 20:52:27, tdresser wrote: > Don't we ...
4 years, 4 months ago (2016-07-27 05:29:00 UTC) #16
tdresser
I'd like to see an integration test for this change – we want to make ...
4 years, 4 months ago (2016-07-27 13:51:51 UTC) #21
dtapuska
On 2016/07/27 13:51:51, tdresser wrote: > I'd like to see an integration test for this ...
4 years, 4 months ago (2016-07-27 14:09:31 UTC) #22
dtapuska
On 2016/07/27 14:09:31, dtapuska wrote: > On 2016/07/27 13:51:51, tdresser wrote: > > I'd like ...
4 years, 4 months ago (2016-07-27 14:10:50 UTC) #23
tdresser
On 2016/07/27 14:10:50, dtapuska wrote: > On 2016/07/27 14:09:31, dtapuska wrote: > > On 2016/07/27 ...
4 years, 4 months ago (2016-07-27 14:23:33 UTC) #24
dtapuska
PTAL https://codereview.chromium.org/2162143002/diff/60001/content/renderer/input/main_thread_event_queue.cc File content/renderer/input/main_thread_event_queue.cc (right): https://codereview.chromium.org/2162143002/diff/60001/content/renderer/input/main_thread_event_queue.cc#newcode73 content/renderer/input/main_thread_event_queue.cc:73: static_cast<blink::WebTouchEvent&>(cloned_event->event()) On 2016/07/27 13:51:51, tdresser wrote: > Having ...
4 years, 4 months ago (2016-08-03 20:20:54 UTC) #26
tdresser
https://codereview.chromium.org/2162143002/diff/80001/content/browser/renderer_host/input/main_thread_event_queue_browsertest.cc File content/browser/renderer_host/input/main_thread_event_queue_browsertest.cc (right): https://codereview.chromium.org/2162143002/diff/80001/content/browser/renderer_host/input/main_thread_event_queue_browsertest.cc#newcode63 content/browser/renderer_host/input/main_thread_event_queue_browsertest.cc:63: " document.addEventListener('mousemove', mouseMoveCounter);" I'd be tempted just to make ...
4 years, 4 months ago (2016-08-04 18:02:22 UTC) #30
dtapuska
https://codereview.chromium.org/2162143002/diff/80001/content/browser/renderer_host/input/main_thread_event_queue_browsertest.cc File content/browser/renderer_host/input/main_thread_event_queue_browsertest.cc (right): https://codereview.chromium.org/2162143002/diff/80001/content/browser/renderer_host/input/main_thread_event_queue_browsertest.cc#newcode63 content/browser/renderer_host/input/main_thread_event_queue_browsertest.cc:63: " document.addEventListener('mousemove', mouseMoveCounter);" On 2016/08/04 18:02:22, tdresser wrote: > ...
4 years, 4 months ago (2016-08-08 15:34:03 UTC) #33
dtapuska
4 years, 4 months ago (2016-08-08 15:34:04 UTC) #34
tdresser
LGTM https://codereview.chromium.org/2162143002/diff/80001/content/renderer/input/main_thread_event_queue.cc File content/renderer/input/main_thread_event_queue.cc (right): https://codereview.chromium.org/2162143002/diff/80001/content/renderer/input/main_thread_event_queue.cc#newcode137 content/renderer/input/main_thread_event_queue.cc:137: void MainThreadEventQueue::SendEventNotificationToMainThread() { On 2016/08/08 15:34:03, dtapuska wrote: ...
4 years, 4 months ago (2016-08-08 16:56:05 UTC) #37
dtapuska
tdresser@ please take another look. I had to fix an issue with the trybots failing ...
4 years, 4 months ago (2016-08-08 20:11:24 UTC) #40
tdresser
LGTM
4 years, 4 months ago (2016-08-08 20:23:05 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2162143002/120001
4 years, 4 months ago (2016-08-08 22:58:08 UTC) #45
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 4 months ago (2016-08-08 23:09:07 UTC) #46
commit-bot: I haz the power
4 years, 4 months ago (2016-08-08 23:11:08 UTC) #48
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/4d87f4e9da90c5fdc94ad48cd6b5c888ef8bd896
Cr-Commit-Position: refs/heads/master@{#410487}

Powered by Google App Engine
This is Rietveld 408576698