bevy_tween
bevy_tween copied to clipboard
Reduce repetitive parent traversal in component tween
TargetComponent::TweenEntity and TargetComponent::TweenParent have to search for their associated tweener every frame which could be a bottleneck of some performance-critical applications with a lot of entities.
Benchmarking would be valuable here
I'm not that familiar with performance tuning, but bevy_eventlistener is dealing with the same problem of traversing up an entity tree.
Looks like that they're using some kind of cache for it, so maybe it'd be worth looking at how they implement it: https://github.com/aevyrie/bevy_eventlistener/blob/main/src/event_dispatcher.rs#L123