commit | 04d3c8a8192852302b61d3b4ca532d7920030677 | [log] [tgz] |
---|---|---|
author | Leszek Swirski <leszeks@chromium.org> | Mon Sep 10 18:18:42 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Sep 10 18:18:42 2018 |
tree | eb2e8ad9b33ea2ba6f3bc67909eb600e4ef5296f | |
parent | db92b9a344716ff822424da764435b11aa62408a [diff] |
[v8] Re-post non-blocking ScriptStreamer tasks (reland^2) Posted blocking ScriptStreamer tasks can end up in a queue, and have their Resource complete loading before the task even starts. When this happens, these tasks will no longer block on network input, but they will still be posted to the blocking task runner, which does not spin up new threads if the running task is not blocked. When there are a lot of small functions posted for streaming, this results in a slightly paradoxical starvation, where the blocking task runner is processing lots of no-longer-blocking tasks all in one thread, as it has no reason to spin up new threads. To avoid this, if a streaming task isn't started before the resource finishes loading, we can cancel this posted task, and instead post a new non-blocking task to the non-blocking thread pool. This frees up the blocking task runner to process only blocking tasks (and thus allows it to spin up new threads for them). TBR=kouhei@chromium.org Bug: chromium:865098 Bug: chromium:866868 Change-Id: Ia955fb7a5fd7a6dfdac6a21d8d866b1d1699054d Reviewed-on: https://chromium-review.googlesource.com/1216963 Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#589984}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .