-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented a priority executor for bevy_task #2167
Conversation
…xecutor # Conflicts: # crates/bevy_tasks/Cargo.toml
…into priority_executor
…into priority_executor
…into priority_executor
…into priority_executor
…into priority_executor
…into priority_executor
…into priority_executor
…into priority_executor
…into priority_executor
…into priority_executor
…into priority_executor
It would be nice to see benchmarks on the previous implementation vs this new |
Also would love to see some |
Co-authored-by: Nathan Ward <43621845+NathanSWard@users.noreply.github.com>
Co-authored-by: Nathan Ward <43621845+NathanSWard@users.noreply.github.com>
@NathanSWard Regarding the benchmark the benchmark is uploaded at /~https://github.com/IGreyGooI/bevy_task_pool_branchmark |
Further improvement could be done by implementing a modified version of async_executor, or other potential workaround. |
You could test the effect by using a patched async_executor with Runner exposed. Just to see if it's worth bringing it up with the author. |
yep that does make sense, I'd would be nice to see some diagnostics that all available cores are being used based on the config (and that it is actually a performance improvement). |
I refer to the benchmark under Could someone else run |
Co-authored-by: Nathan Ward <43621845+NathanSWard@users.noreply.github.com>
Here is the benchmark result from running |
Here is the benchmark result from running |
@IGreyGooI, can you comment in #2373? We've since relicensed to MIT + Apache, and I'd like to either ensure that this can be picked up or close it out. |
this is potentially superceded by #4740 too. |
A Priority Executor is implemented on top of the
async_executor::Executor
, bevy_task is modified to usePriorityExecutor
instead. None of TaskPool API is modified(but should expect an API change).IoTaskPool
andAsyncComputeTaskPool
across all crates are replaced byComputeTaskPool
for testing purpose.Summery of behavior of
PriorityExecutor
:a. Running tasks with
Priority::FinishWithinFrame
taskb. Running tasks with
Priority::AcrossFrame
andPriority::IO
tasksPriority::FinishWithinFrame
tasks are finished.This is meant to be a solution of #1907, However, more tests are needed to ensure:
Passed:
cargo run -p ci
cargo test --all-targets --workspace