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

Maximize distance between exclusive systems #12153

Open
james7132 opened this issue Feb 27, 2024 · 1 comment
Open

Maximize distance between exclusive systems #12153

james7132 opened this issue Feb 27, 2024 · 1 comment
Labels
A-ECS Entities, components, systems, and events C-Performance A change motivated by improving speed, memory usage or compile times

Comments

@james7132
Copy link
Member

james7132 commented Feb 27, 2024

What problem does this solve or what need does it fill?

After #11845, handle_internal_asset_events, an exclusive system, was moved to PreUpdate, however, due to it's ordering constraint, all of the TrackAssets events cannot start until it's done. However, the exclusive system conflicts with every other system that is topologically sorted before it, so it can't start until all of them are finished. Even though there is no strict ordering constraint between the exclusive system and the systems running before it, it will prevent these two groups of systems from running in parallel with each other, which may have a performance cost.

image

What solution would you like?

Change the topological sort on a schedule's system to maximize the number of systems that can parallelize together by forcing exclusive systems apart as much as possible.

This was already done for apply_deferred, perhaps the same logic can be applied to other exclusive systems as well?

What alternative(s) have you considered?

Leaving it as is.

@james7132 james7132 added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled A-ECS Entities, components, systems, and events C-Performance A change motivated by improving speed, memory usage or compile times and removed S-Needs-Triage This issue needs to be labelled C-Feature A new feature, making something new possible labels Feb 27, 2024
@james7132 james7132 changed the title Maximize distance between exclusvie systems Maximize distance between exclusive systems Feb 27, 2024
@hymm
Copy link
Contributor

hymm commented Mar 4, 2024

It'd probably make sense to build this on top of this work. #11094

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Performance A change motivated by improving speed, memory usage or compile times
Projects
None yet
Development

No branches or pull requests

2 participants