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

Consider removing System::world_post_processing() #156

Closed
Anders429 opened this issue Dec 20, 2022 · 0 comments
Closed

Consider removing System::world_post_processing() #156

Anders429 opened this issue Dec 20, 2022 · 0 comments
Labels
A - Scheduling Area: Parallel scheduling of systems. C - Code Quality Category: Addressing quality and cleanup of existing code. C - Usability Category: How easy it is for users to use the library. F - rayon Feature: Parallel processing through the rayon library. P - Low Priority: Not particularly urgent. V - Major Breaking Change Versioning: Requires a major bump according to semver.

Comments

@Anders429
Copy link
Owner

I initially added this as a way to allow a system to modify a World directly, allowing it to, say, compile a list of entities to add, and then add them after the system has processed. However, this same logic could easily occur outside of a system. The reasoning for adding it to the system itself was to allow post-processing to occur between stages in a Schedule, but I am coming to change my thinking on this.

Having processing occur between schedule stages makes optimizations such as #73 difficult to implement in an understandable way. It is tough for a user to be able to reason about when changes to a world are made if stage boundaries are not consistent for every single run of a schedule, and something like #73 would mean that stages could change depending on what archetypes exist in the world.

It seems that, rather than dealing with complicated stage boundary rules, processing at a stage boundary should be eliminated entirely. If a user wants processing to occur at a stage boundary, that boundary can be created by defining two separate schedules and running them in sequence, with whatever processing they need running in between those schedules. This is the same thinking behind the removal of the flush task from schedule creation in #142: if a user wants there to be a barrier between stages there, the easiest way to allow this is to require defining an entirely new schedule.

@Anders429 Anders429 added P - Low Priority: Not particularly urgent. F - rayon Feature: Parallel processing through the rayon library. A - Scheduling Area: Parallel scheduling of systems. V - Major Breaking Change Versioning: Requires a major bump according to semver. C - Usability Category: How easy it is for users to use the library. labels Dec 20, 2022
@Anders429 Anders429 added the C - Code Quality Category: Addressing quality and cleanup of existing code. label Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A - Scheduling Area: Parallel scheduling of systems. C - Code Quality Category: Addressing quality and cleanup of existing code. C - Usability Category: How easy it is for users to use the library. F - rayon Feature: Parallel processing through the rayon library. P - Low Priority: Not particularly urgent. V - Major Breaking Change Versioning: Requires a major bump according to semver.
Projects
None yet
Development

No branches or pull requests

1 participant