At the moment MainThreadEventQueue sends multiple inflight events to main in *separate* posted tasks. It seems we should be able to post multiple events in a single task and avoid the task overhead.
Looking at a perf flamechart it appears most of the MainThreadEventQueue::HandleEvent cost is just posting the tasks [1]. Hoever, I am not sure how often we have more than a single inflight event.
[1] https://screenshot.googleplex.com/bopw4wQP4AP
FYI, the perf trace was obtained from smoothness.key_silk_cases/.*inbox_app.html..* benchmark
Comment 1 by dtapu...@chromium.org
, Dec 15 2016