Reduce MatrixMathHelper allocations (#58275) - #58275
Conversation
|
@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D118277120. |
cortinico
left a comment
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
|
/review |
🤖 AI code reviewDecision: Ready for human review Overall PR risk: Medium. The change modifies existing behavior rather than adding an isolated path, affecting Android matrix decomposition for view transforms and JNI bridge deserialization via ReadableNativeMap/ReadableNativeArray. The handoff notes the most plausible breakage is incorrect decomposition of perspective or zero-scale matrices and key/value alignment regressions, with blast radius bounded to Android UI transforms and bridge reads and rollback via direct revert. No critical or warning findings were reported. No findings. This review is advisory — it never blocks a merge and never auto-approves. |
Summary: Matrix decomposition runs while applying view transforms and currently allocates a nested normalized matrix plus new arrays for each vector operation. Flatten the normalized matrix and update the temporary rows in place to remove ten allocations per decomposition without changing the public helpers. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D118277120
96c979c to
72f99e5
Compare
Summary:
Matrix decomposition runs while applying view transforms and currently allocates a nested normalized matrix plus new arrays for each vector operation. Flatten the normalized matrix and update the temporary rows in place to remove ten allocations per decomposition without changing the public helpers.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D118277120