-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Replace remaining uses of &T, Changed<T>
with Ref
in UI system queries
#8567
Replace remaining uses of &T, Changed<T>
with Ref
in UI system queries
#8567
Conversation
…tem` and `calc_bounds` UI systems.
Changed
with Ref
Changed
with Ref
in UI system queries
Changed
with Ref
in UI system queries&T, Changed<T>
with Ref
in UI system queries
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.
Much clearer!
I'm a bit confused by this - how is I'd assumed that using |
|
@alice-i-cecile I have a question. Didn't we at some point talk about possibly tracking that information at the archetype level in the ECS in the future, to allow for more efficient change detection? So that query filters can actually result in an efficiency improvement by only accessing changed entities? This PR seems counterproductive. If we ever do that, we would have to change it back. Also, performance aside, I really disagree that using I know this PR was merged long ago, and me expressing an opinion now probably doesn't matter much, but this really feels like the wrong direction to me. |
That's a valid position, and yeah, we should be able to have multiple layers of change detection for faster operation in the future. |
Objective
Replace
Query<&T, Changed<T>>
style queries with the more efficientQuery<Ref<T>>
form in two of the UI systems.Changelog
Replaced use of
Changed
withRef
in queries in theui_layout_system
andcalc_bounds
UI systems.