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

Replace List with LocalVector on Skeleton3D's bone transform update. #92164

Merged
merged 1 commit into from
May 21, 2024

Conversation

DarioSamo
Copy link
Contributor

@DarioSamo DarioSamo commented May 20, 2024

Along the lines of #91989, this is a CPU-oriented optimization around removing allocations from a hot path detected in Nuku Warriors that led to around 2000+ allocations per frame due to the usage of a linked list to do a pre-order traversal.

The alternative implementation is fairly minimal and reuses a LocalVector across frames. I'm coming up with a reliable way to benchmark these, but if @Calinou perhaps already has something that causes this same hot path to be hit, that could be ideal to prove the result in an open benchmark.

No behavior differences are expected.

@TokageItLab TokageItLab modified the milestones: 4.x, 4.3 May 20, 2024
@akien-mga akien-mga merged commit d7a5f9d into godotengine:master May 21, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants