Update base for Update on "compiler: fixture for suboptimal jsx sibling memo block merging"
React Compiler attempts to merge consecutive reactive scopes in order to reduce overhead. The basic idea is that if two consecutive scopes would always invalidate together then we should merge them. It gets more complicated, though, because values produced by the earlier scope may not always invalidate when their inputs do. For example, a scope that produces `fn(x)` may not invalidate on all changes to `x` if the function is `Math.max(x, 10)` (changing x from 8 to 9 won't change the output). Previously we were conservative and only merged if either: * the two scopes had the same dependencies * the second scope's deps exactly matched the previous scope's outputs. You can see this in the new fixture, where the second `<button>` gets its own scope, which happens because the preceding scope has an extra output that isn't a dep of the `<button>`'s scope. [ghstack-poisoned]
Showing
- compiler/Cargo.lock 2 additions, 2 deletionscompiler/Cargo.lock
- compiler/apps/playground/components/Editor/Output.tsx 16 additions, 0 deletionscompiler/apps/playground/components/Editor/Output.tsx
- compiler/apps/playground/components/TabbedWindow.tsx 6 additions, 2 deletionscompiler/apps/playground/components/TabbedWindow.tsx
- compiler/apps/playground/package.json 1 addition, 1 deletioncompiler/apps/playground/package.json
- compiler/packages/babel-plugin-react-compiler/src/SSA/EliminateRedundantPhi.ts 1 addition, 1 deletion...el-plugin-react-compiler/src/SSA/EliminateRedundantPhi.ts
- compiler/packages/react-compiler-healthcheck/src/checks/strictMode.ts 6 additions, 2 deletions...kages/react-compiler-healthcheck/src/checks/strictMode.ts
- compiler/packages/react-compiler-healthcheck/src/index.ts 1 addition, 1 deletioncompiler/packages/react-compiler-healthcheck/src/index.ts
- compiler/yarn.lock 145 additions, 84 deletionscompiler/yarn.lock
- fixtures/attribute-behavior/AttributeTableSnapshot.md 75 additions, 0 deletionsfixtures/attribute-behavior/AttributeTableSnapshot.md
- fixtures/attribute-behavior/public/index.html 1 addition, 0 deletionsfixtures/attribute-behavior/public/index.html
- fixtures/attribute-behavior/src/attributes.js 16 additions, 0 deletionsfixtures/attribute-behavior/src/attributes.js
- packages/react-devtools-inline/__tests__/__e2e__/components.test.js 35 additions, 18 deletions...eact-devtools-inline/__tests__/__e2e__/components.test.js
- packages/react-devtools-shared/src/backend/utils.js 5 additions, 1 deletionpackages/react-devtools-shared/src/backend/utils.js
- packages/react-devtools-shared/src/devtools/ContextMenu/ContextMenu.css 1 addition, 1 deletion...-devtools-shared/src/devtools/ContextMenu/ContextMenu.css
- packages/react-devtools-shared/src/devtools/ContextMenu/ContextMenu.js 80 additions, 111 deletions...t-devtools-shared/src/devtools/ContextMenu/ContextMenu.js
- packages/react-devtools-shared/src/devtools/ContextMenu/ContextMenuContainer.js 59 additions, 0 deletions...s-shared/src/devtools/ContextMenu/ContextMenuContainer.js
- packages/react-devtools-shared/src/devtools/ContextMenu/ContextMenuItem.css 4 additions, 1 deletion...tools-shared/src/devtools/ContextMenu/ContextMenuItem.css
- packages/react-devtools-shared/src/devtools/ContextMenu/ContextMenuItem.js 5 additions, 11 deletions...vtools-shared/src/devtools/ContextMenu/ContextMenuItem.js
- packages/react-devtools-shared/src/devtools/ContextMenu/Contexts.js 0 additions, 91 deletions...eact-devtools-shared/src/devtools/ContextMenu/Contexts.js
- packages/react-devtools-shared/src/devtools/ContextMenu/types.js 29 additions, 0 deletions...s/react-devtools-shared/src/devtools/ContextMenu/types.js
Please register or sign in to comment