-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[Merged by Bors] - Skinned extraction speedup #4428
[Merged by Bors] - Skinned extraction speedup #4428
Conversation
I’d be interested to make. GlobalTransform just an Affine3A internally and not a separate representation at all, and see what impact that has on relevant systems… :) |
yup that would probably be faster, but also a much bigger bite to take... |
Also, the title is incorrect. An almost 48% reduction in execution time is enormous. |
Copying my comments from Discord:
If we can avoid this double buffered copy, I think we could save quite a bit more time too. Can you test saving the length before appending, directly push items to the total joint buffer, and truncate-and-return back to the start length if there is a failure to fetch? This should let us handle the failure case without needing a temporary buffer. |
Co-Authored-By: James Liu <3137680+james7132@users.noreply.github.com>
removed the need of the temp vec for 1ms extra gain 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are some tasty wins. Well done!
bors r+ |
# Objective - While animating 501 https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BrainStem, I noticed things were getting a little slow - Looking in tracy, the system `extract_skinned_meshes` is taking a lot of time, with a mean duration of 15.17ms ## Solution - ~~Use `Vec` instead of a `SmallVec`~~ - ~~Don't use an temporary variable~~ - Compute the affine matrix as an `Affine3A` instead - Remove the `temp` vec | |mean| |---|---| |base|15.17ms| |~~vec~~|~~9.31ms~~| |~~no temp variable~~|~~11.31ms~~| |removing the temp vector|8.43ms| |affine|13.21ms| |all together|7.23ms|
This PR was included in a batch that timed out, it will be automatically retried |
# Objective - While animating 501 https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BrainStem, I noticed things were getting a little slow - Looking in tracy, the system `extract_skinned_meshes` is taking a lot of time, with a mean duration of 15.17ms ## Solution - ~~Use `Vec` instead of a `SmallVec`~~ - ~~Don't use an temporary variable~~ - Compute the affine matrix as an `Affine3A` instead - Remove the `temp` vec | |mean| |---|---| |base|15.17ms| |~~vec~~|~~9.31ms~~| |~~no temp variable~~|~~11.31ms~~| |removing the temp vector|8.43ms| |affine|13.21ms| |all together|7.23ms|
This PR was included in a batch that timed out, it will be automatically retried |
# Objective - While animating 501 https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BrainStem, I noticed things were getting a little slow - Looking in tracy, the system `extract_skinned_meshes` is taking a lot of time, with a mean duration of 15.17ms ## Solution - ~~Use `Vec` instead of a `SmallVec`~~ - ~~Don't use an temporary variable~~ - Compute the affine matrix as an `Affine3A` instead - Remove the `temp` vec | |mean| |---|---| |base|15.17ms| |~~vec~~|~~9.31ms~~| |~~no temp variable~~|~~11.31ms~~| |removing the temp vector|8.43ms| |affine|13.21ms| |all together|7.23ms|
Timed out. |
bors r+ |
# Objective - While animating 501 https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BrainStem, I noticed things were getting a little slow - Looking in tracy, the system `extract_skinned_meshes` is taking a lot of time, with a mean duration of 15.17ms ## Solution - ~~Use `Vec` instead of a `SmallVec`~~ - ~~Don't use an temporary variable~~ - Compute the affine matrix as an `Affine3A` instead - Remove the `temp` vec | |mean| |---|---| |base|15.17ms| |~~vec~~|~~9.31ms~~| |~~no temp variable~~|~~11.31ms~~| |removing the temp vector|8.43ms| |affine|13.21ms| |all together|7.23ms|
# Objective - While animating 501 https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BrainStem, I noticed things were getting a little slow - Looking in tracy, the system `extract_skinned_meshes` is taking a lot of time, with a mean duration of 15.17ms ## Solution - ~~Use `Vec` instead of a `SmallVec`~~ - ~~Don't use an temporary variable~~ - Compute the affine matrix as an `Affine3A` instead - Remove the `temp` vec | |mean| |---|---| |base|15.17ms| |~~vec~~|~~9.31ms~~| |~~no temp variable~~|~~11.31ms~~| |removing the temp vector|8.43ms| |affine|13.21ms| |all together|7.23ms|
# Objective - While animating 501 https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/BrainStem, I noticed things were getting a little slow - Looking in tracy, the system `extract_skinned_meshes` is taking a lot of time, with a mean duration of 15.17ms ## Solution - ~~Use `Vec` instead of a `SmallVec`~~ - ~~Don't use an temporary variable~~ - Compute the affine matrix as an `Affine3A` instead - Remove the `temp` vec | |mean| |---|---| |base|15.17ms| |~~vec~~|~~9.31ms~~| |~~no temp variable~~|~~11.31ms~~| |removing the temp vector|8.43ms| |affine|13.21ms| |all together|7.23ms|
Objective
extract_skinned_meshes
is taking a lot of time, with a mean duration of 15.17msSolution
UseVec
instead of aSmallVec
Don't use an temporary variableAffine3A
insteadtemp
vecvec9.31msno temp variable11.31ms