-
-
Couldn't load subscription status.
- Fork 3.6k
fix(): multiplyTransformMatrixArray redundant multiplication #9860
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
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
|
Build Stats
|
6bc62a2 to
210c18c
Compare
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.
ready
5ffce46 to
076402a
Compare
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.
I don't know if hasDimensionProps is worth it
Description
#9851 (comment)
curris always defined inmultiplyTransformMatrixArray. It should beundefinedso that the condition inside the reduce cb takes affect. Since it wasn't the multiplication was executed many redundant times.This has been found by @jiayihu and @asturur in #9851
It caused a perf hit and now we understand why
I am to blame!
closes #9851
In addition I have exposed
hasDimensionMatrixPropsto skipcalcDimensionsMatrixcalculation but from analyzing the code I don't see and real benefit. Instead of callingcreateScaleMatrix(1, 1)and doing 3 iterations over the matrix array it will callhasDimensionMatrixPropsand concat iMatrix.So maybe it better and maybe not.
In Action