PSA: Task APIs Update, New Docs, and Upcoming Features

117 views
Skip to first unread message

Gabriel Charette

unread,
Sep 25, 2019, 11:24:40 AM9/25/19
to Chromium-dev, scheduler-dev, Darin Fisher, Albert Wong, Daniel Cheng, Wez, les...@chromium.org, Hannes Payer, Chris Hamilton

Hello everyone,


It’s been a while since we provided chromium-dev@ with an update on the //base/task APIs. Lots has happened since the migration to TaskScheduler days :). For one, in case you missed it, TaskScheduler was renamed to ThreadPool.


News:


Work in progress:

  • Jobs API. A power user API, mostly intended for v8, to be able to schedule a single base::RepeatingCallback and request that ThreadPool workers invoke it concurrently. This avoids degenerate cases which occur when many components post “num cores” tasks and the scheduler lacks context. The API also supports yield-semantics so user-visible job can use all cores but get out of the way when a user-blocking job comes in.

  • Browser UI Thread Scheduler is live and there’s work in progress to take advantage of it on startup.

  • C++ Promises. Impl is in progress. Discussing with chrome-eng-review to determine how much functionality we want to expose in the initial API. (If you know of use cases that need Reject/Catch semantics we’d like to hear them).


Featured:

  • Enhanced the ThreadPool configuration to be able to share threads between blocking and non-blocking tasks. This enabled Script Streaming improvements that yielded: 3% on time-to-interactive @ 99th percentile, reduced main-thread stall time waiting for script compilation by 5-20%, and most importantly resulted in a 25% improvement in time-to-shakira. Congrats leszeks@ and v8 team for extracting such amazing results from better scheduling :).

  • Reduced UI thread jank by 6X on Windows and 48X on Mac [1] thanks to analysis of traces from Slow Reports w/ Sampling Profiler.


Stay up to date:


Cheers,
Gab on behalf of scheduler-dev@

Gabriel Charette

unread,
Sep 27, 2019, 3:12:30 PM9/27/19
to Gabriel Charette, Erik Chen, Chromium-dev, scheduler-dev, Darin Fisher, Albert Wong, Daniel Cheng, Wez, les...@chromium.org, Hannes Payer, Chris Hamilton
Just got the green light to share these compelling jank reduction timeline views :) (thanks +Erik Chen for adding the metric last year to surface the problem). This metric highlights single thread jank and we have more efforts under way to reduce cross-thread and cross-process jank.

Windows
 

Mac
 

Reply all
Reply to author
Forward
0 new messages