-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Changed doesn't explain any potential drawback #3082
Description
How can Bevy's documentation be improved?
The docs mention this is a performance optimization to iterate over changed entities/components only. There's no mention of what the cost of maintaining such information is. Surely this doesn't come "for free"; there must be some caching somewhere to compare with the previous frame's version and be able to tell. What's the cost? Can this be used on many different single-components (like, should I use Changed<MyType> for most of my own types, even if used once or twice only)? Or is it more beneficial on a single component with many instances (like the Changed<Transform> example? Is there a minimum order of magnitude number below which Changed is prohibitive compared to just iterating over all existing items without any caching?
I checked the docs on main too, and it's no better. It just mentions ChangeTrackers in addition; I'm not even understanding the difference between ChangeTrackers and Changed.