-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Remove SimpleExecutor
#18741
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
base: main
Are you sure you want to change the base?
Remove SimpleExecutor
#18741
Conversation
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
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.
Yup, we don't need both this and SingleThreadedExecutor
anymore, and the latter is only slightly more complicated and more consistent with MultithreadedExecutor
.
Migration guide is fine and no other traces remain.
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.
Yay, less code!
|
||
Bevy has removed `SimpleExecutor`, one of the `SystemExecutor`s in Bevy alongside `SingleThreadedExecutor` and `MultiThreadedExecutor` (which aren't going anywhere any time soon). | ||
The `MultiThreadedExecutor` is great at large schedules and async heavy work, and the `SingleThreadedExecutor` is good at smaller schedules or schedules that have fewer parallelizable systems. | ||
So what was `SimpleExecutor` good at? Not much. That's why it was removed. If you're curious, it was originally created to function without any schedule "sync points", which apply deferred commands. |
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.
It might be worth being a little more precise here, in case anyone is relying on the exact behavior. The difference between SimpleExcecutor
and SingleThreadedExcecutor
is that SimpleExecutor
applies deferred commands after every system, while SingleThreadedExecutor
only applies them at sync points.
So, changing to SingleThreadedExecutor
will usually work the same, but users might need to add sync points, especially if they had been using methods like after_ignore_deferred
. Worse, I think that if you add no schedule constraints at all, then SimpleExecutor
would happen to run the systems in the order they were inserted, but we wouldn't automatically add sync points. So it might be necessary to add before
/after
/chain
calls.
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.
Good call. I've updated the migration guide, but feel free to request changes if you see anything to improve!
# Objective Contributes to #18741 and #18453. ## Solution Deprecate `SimpleExecutor`. If users run into migration issues, we can backtrack. Otherwise, we follow this up with #18741 We can't easily deprecate the module too because of [this](rust-lang/rust#47238). ## Testing CI --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Cyrill Schenkel <cyrill.schenkel@gmail.com>
# Objective Contributes to bevyengine#18741 and bevyengine#18453. ## Solution Deprecate `SimpleExecutor`. If users run into migration issues, we can backtrack. Otherwise, we follow this up with bevyengine#18741 We can't easily deprecate the module too because of [this](rust-lang/rust#47238). ## Testing CI --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Cyrill Schenkel <cyrill.schenkel@gmail.com>
@@ -0,0 +1,15 @@ | |||
--- | |||
title: Removed Simple Executor |
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.
This migration guide seems to be duplicate now, see simple_executor_going_away.md
, which is about the deprecation of the executor
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.
Yeah, it should be one or the other.
Do we want to remove it for 0.17 or just deprecate? If just deprecate, we should save this for 0.18. Otherwise, I'll update this pr and remove the old migration guide.
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.
Deprecating feels like a nicer migration experience :)
That way users can ask for help while upgrading without their app being broken until they made the switch to another executor
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.
@alice-i-cecile could we get a 0.18 milestone? Or do we just not merge this until 0.17 is released?
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.
Sounds good. I'll let this go cold and we can come back to it later.
Objective
Reduce complexity and code duplication of schedule executors. This is an alternative to fix #18453.
It sounds like this was a temporary solution to "sync points" in schedules, but now those can be inferred, so
SimpleExecutor
is unnecessary now.Further,
SimpleExecutor
andSingleThreadedExecutor
were very similar, which was becoming a consistency and code quality headache.Solution
Remove
SimpleExecutor
.Testing
CI