Skip to content
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

Convert exclusive systems in Bevy to ordinary systems wherever possible #2767

Closed
alice-i-cecile opened this issue Sep 3, 2021 · 2 comments
Closed
Labels
C-Code-Quality A section of code that is hard to understand or change C-Performance A change motivated by improving speed, memory usage or compile times D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@alice-i-cecile
Copy link
Member

alice-i-cecile commented Sep 3, 2021

I recently noticed that several exclusive systems in Bevy no longer need to be exclusive systems: change_window and play_queued_audio_system were the two I initially noticed. These were originally exclusive systems due to an inability to use NonSend resources in parallelizable systems: this limitation has since been removed.

These and any other similar cases should be converted to ordinary parallel systems (in the same stage) to improve the performance of Bevy's apps by reducing unnecessary blocking, and better communicate intent (we really don't need access to everything in the world).

bevy_mod_debug_dump may be able to assist you in grabbing a list of all of the systems to inspect. Or just search for uses of .exclusive_system in the code base using your IDE of choice.

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy C-Performance A change motivated by improving speed, memory usage or compile times C-Code-Quality A section of code that is hard to understand or change labels Sep 3, 2021
@cart
Copy link
Member

cart commented Sep 4, 2021

Good call!

bors bot pushed a commit that referenced this issue Apr 25, 2022
)

Closes #2767.

Converted:
- `play_queued_audio_system`
- `change_window`
exjam pushed a commit to exjam/bevy that referenced this issue May 22, 2022
@tim-blackbird
Copy link
Contributor

There are no instances of .exclusive_system() anymore since its no longer required, and I couldn't find any systems that accessed &mut World or used at_end/at_start without needing it.
This can probably be closed :)

ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Code-Quality A section of code that is hard to understand or change C-Performance A change motivated by improving speed, memory usage or compile times D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
3 participants