-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add World::run_system_set
to run only the systems in a SystemSet
#12726
Conversation
I'm not a fan of removing the feature guard on Executor::run for a niche feature like this. The guard is there so that production builds don't pay the cost of system stepping. |
The cost being the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System stepping was noted to have a significant performance impact at the start of 0.13 due to being enabled by default. This PR reverts that. We also made notable improvements to the scheduler performance as well, so this is worth reevaluating. Can you please profile some of the stress tests in the repo (many_foxes, many_cubes, etc.) to help ensure this isn't a performance regression?
@hymm @james7132 I added a change that removed any perf impact, at the cost of some code duplication. I don't know if that is better? |
Actually, this functionality |
For benchmarking, I did add the |
I like the competing PR better :) |
Objective
Fixes #12717
As explained in the issue, it would be convenient to be able to run only the systems that are inside a
SystemSet
. (for example for benchmarking, I would like to only run a specificSystemSet
of myApp
.Solution
FixedBitSet
of systems that need to be fixed when running the schedule.run_system_set
which computes the bitset of systems to skip from the graph:SystemSchedule
TODO:
run_with_skip
that takes a closureBox<dyn Fn(&Schedule) -> FixedBitSet>
as input that defines which systems we want to skip from the schedule, but I wasn't able to get it working (myclosure
wasn'tdyn Fn
apparently? I would appreciate help thereChangelog
Added
World::run_system_set
to run once the systems that are part of a givenSystemSet