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

Issue 929433005: WIP: A couple of more ChannelMojo speedup ideas (Closed)

Created:
5 years, 10 months ago by Hajime Morrita
Modified:
5 years, 7 months ago
Reviewers:
viettrungluu
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

WIP: A couple of more ChannelMojo speedup ideas 1. Add mojo::embedder::SetAsyncMessageCallback() The callback is installed to LoalMessagePipeEndpoint, and allows the embedder to "steal" arrived mesages before it is enqueued. With this, ChromeMojo can bypass subsequent MojoReadMessage() calls. 13+/-7% speedup for small (14b) message benchmark 2. Introduce MessageInTransit::ReadContext It allows Channel and friends to defer the MessageInTransit instance creation. With the async message callback, now ChanelMojo can skip creating MessageInTransit instance in many cases and save an extra copying. 15+/-3% speedup for non-small (hundred-thousand bytes) message benchmark. R=viettrungluu@chromium.org

Patch Set 1 #

Patch Set 2 : Build and test fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+298 lines, -54 lines) Patch
M ipc/ipc_perftest_support.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ipc/mojo/async_handle_waiter.h View 1 chunk +13 lines, -2 lines 0 comments Download
M ipc/mojo/async_handle_waiter.cc View 1 5 chunks +63 lines, -12 lines 0 comments Download
M ipc/mojo/async_handle_waiter_unittest.cc View 5 chunks +15 lines, -8 lines 0 comments Download
M ipc/mojo/ipc_message_pipe_reader.h View 3 chunks +6 lines, -4 lines 0 comments Download
M ipc/mojo/ipc_message_pipe_reader.cc View 4 chunks +11 lines, -4 lines 0 comments Download
M third_party/mojo/src/mojo/edk/embedder/embedder.h View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/embedder/embedder.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/channel.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/channel_endpoint.h View 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/channel_endpoint.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/channel_endpoint_client.h View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/core.h View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/core.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/dispatcher.h View 4 chunks +8 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/dispatcher.cc View 2 chunks +13 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/endpoint_relayer.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/mojo/src/mojo/edk/system/endpoint_relayer.cc View 2 chunks +5 lines, -3 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/incoming_endpoint.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/mojo/src/mojo/edk/system/incoming_endpoint.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/local_message_pipe_endpoint.h View 3 chunks +4 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/local_message_pipe_endpoint.cc View 2 chunks +17 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/message_in_transit.h View 1 2 chunks +33 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/message_pipe.h View 3 chunks +9 lines, -1 line 0 comments Download
M third_party/mojo/src/mojo/edk/system/message_pipe.cc View 4 chunks +31 lines, -4 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/message_pipe_dispatcher.h View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/message_pipe_dispatcher.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/message_pipe_endpoint.h View 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/edk/system/message_pipe_endpoint.cc View 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Hajime Morrita
5 years, 10 months ago (2015-02-13 23:48:49 UTC) #1
Hajime Morrita
WDYT? Well, I'm sure you don't like this. But I wonder if the speedup can ...
5 years, 10 months ago (2015-02-13 23:52:54 UTC) #2
viettrungluu
On 2015/02/13 23:52:54, morrita wrote: > WDYT? > > Well, I'm sure you don't like ...
5 years, 10 months ago (2015-02-14 00:58:30 UTC) #3
Hajime Morrita
On 2015/02/14 00:58:30, viettrungluu wrote: > On 2015/02/13 23:52:54, morrita wrote: > > WDYT? > ...
5 years, 10 months ago (2015-02-14 01:23:41 UTC) #4
chromium-reviews
On Fri, Feb 13, 2015 at 5:23 PM, <morrita@chromium.org> wrote: > On 2015/02/14 00:58:30, viettrungluu ...
5 years, 10 months ago (2015-02-14 01:48:13 UTC) #5
Hajime Morrita
On 2015/02/14 01:48:13, chromium-reviews wrote: > On Fri, Feb 13, 2015 at 5:23 PM, <mailto:morrita@chromium.org> ...
5 years, 10 months ago (2015-02-25 19:07:29 UTC) #6
Hajime Morrita
5 years, 9 months ago (2015-03-24 19:55:53 UTC) #7
OK, I profiled mojo_message_pipe_perftests a couple of message sizes
(12 bytes and 20736 bytes) and made a plot for each.

https://gist.githack.com/omo/6cdd8c4c6ade34dfc6c3/raw/4e001f081494407cd714816...
https://gist.githack.com/omo/6cdd8c4c6ade34dfc6c3/raw/80831a443587c5b2a56c7cd...

Hope this is interesting for you.

Powered by Google App Engine
This is Rietveld 408576698