Open Multirious opened 4 months ago
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
TargetComponent::TweenEntity
andTargetComponent::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.