dillon1000/react
Commit
Browse files [compiler][patch] Patch O(n^2) traversal in validatePreserveMemo
Double checked by syncing internally and verifying the # of `visitInstruction` calls with unique `InstructionId`s. This is a bit of an awkward pattern though. A cleaner alternative might be to override `visitValue` and store its results in a sidemap (instead of returning) ghstack-source-id: f6797d765224fb49c7d26cd377319662830d7348 Pull Request resolved: https://github.com/facebook/react/pull/30077
Changed paths4 files
First-parent comparisoncompiler/packages/babel-plugin-react-compiler/src/Validation/ValidatePreservedManualMemoization.ts ModifiedA compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-slow-validate-preserve-memo.expect.md AddedA compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/repro-slow-validate-preserve-memo.ts AddedM compiler/packages/snap/src/sprout/shared-runtime.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…