Skip to content
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

Reduce repetitive parent traversal in component tween #7

Open
Multirious opened this issue Apr 4, 2024 · 2 comments
Open

Reduce repetitive parent traversal in component tween #7

Multirious opened this issue Apr 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Multirious
Copy link
Owner

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 Multirious added the enhancement New feature or request label Apr 4, 2024
@Multirious
Copy link
Owner Author

Benchmarking would be valuable here

@musjj
Copy link
Contributor

musjj commented Apr 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants