TaskWorklet: Tweak passing results from completed prerequisites
1. When selecting a thread for a task, consider which thread all prerequisites were assigned, not just the ones still pending. 2. Store the v8::Value for completed tasks. 3. If a task will run on the same thread as a completed prerequisite, hop to the worker thread and pass the prerequisite's result directly without a deserialization. (2) enables this, and (1) increases the frequency in which this optimization can be used. 4. Given that it is no longer guaranteed that the serialized result will be needed (i.e., if all dependents run on the same thread and task.result is never requested on the main thread, only the v8::Value will be used), move to a lazy serialization model, where the result is only serialized when it is promised via task.result or when a dependent is assigned to a different thread. Bug: 879306 Change-Id: I22fe5f201f22b376861a5fb6d6e881ce0d5785cc Reviewed-on: https://chromium-review.googlesource.com/c/1311498 Commit-Queue: Nate Chapin <japhet@chromium.org> Reviewed-by:Hiroki Nakagawa <nhiroki@chromium.org> Cr-Commit-Position: refs/heads/master@{#610136}
Showing
This diff is collapsed.
Please register or sign in to comment