-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Add common component conditions #7711
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
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
24302cc
Add common component conditions
Shatur 749a42b
Use more clear description
Shatur e992e67
Add any_component_removed
Shatur 93ab94a
Fix typo
Shatur 7fcad94
Use is_empty()
Shatur 6027d4d
Apply docs suggestions
Shatur 9bcad18
Apply more docs suggestions
Shatur 74a2c08
Merge remote-tracking branch 'origin/main' into component-conditions
Shatur 86c78a6
Remove extra mut
Shatur 7d33c0d
Revert "Remove extra mut"
Shatur 15df851
Revert "Use is_empty()"
Shatur 48ab039
Merge remote-tracking branch 'origin/main' into component-conditions
Shatur ffaea8f
Add comment about iter().count()
Shatur 5b4af1b
Merge remote-tracking branch 'origin/main' into component-conditions
Shatur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
These potentially do a full world scan in the multithreaded executor, which not only runs single threaded but blocks any further system's run conditions from being evaluated and tasks launched. The only early return is if no archetypes match the query, everything else does a full scan, and will scale linearly with the number of those components in the world. This is relatively easy performance footgun, same with the other condition below.
Even with it documented, I still don't think it's a good idea to readily provide this to users without some form of archetype-level change detection optimization.
Uh oh!
There was an error while loading. Please reload this page.
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.
Yep, this is what I mentioned in the description. I thought it's fine if documented. But your concern is exactly why it wasn't included in #7579.