bevy_tween icon indicating copy to clipboard operation
bevy_tween copied to clipboard

Reduce repetitive parent traversal in component tween

Open Multirious opened this issue 1 year ago • 2 comments

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.

Multirious avatar Apr 04 '24 14:04 Multirious

Benchmarking would be valuable here

Multirious avatar Apr 04 '24 14:04 Multirious

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

musjj avatar Apr 05 '24 10:04 musjj