react icon indicating copy to clipboard operation
react copied to clipboard

[Fiber] Replace setCurrentDebugFiberInDEV with runWithFiberInDEV

Open sebmarkbage opened this issue 1 year ago • 3 comments

Stacked on #29044.

To work with console.createTask(...).run(...) we need to be able to run a function in the scope of the task.

The main concern with this, other than general performance, is that it might add more stack frames on very deep stacks that hit the stack limit. Such as with the commit phase where we recursively go down the tree. These callbacks aren't really necessary in the recursive part but only in the shallow invocation of the commit phase for each tag. So we could refactor the commit phase so that only the shallow part at each level is covered this way.

sebmarkbage avatar May 22 '24 19:05 sebmarkbage

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 23, 2024 4:54pm

vercel[bot] avatar May 22 '24 19:05 vercel[bot]

So we could refactor the commit phase so that only the shallow part at each level is covered this way.

fricken yes please

rickhanlonii avatar May 22 '24 19:05 rickhanlonii

Comparing: 84239da896fd7395a667ab1e7ef1ef338a32de8f...abd486f97711aec7ae8b1bcb59208f5d99278b0c

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.66 kB 6.66 kB = 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 495.90 kB 495.82 kB = 88.79 kB 88.78 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.67 kB 6.67 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 500.70 kB 500.62 kB = 89.47 kB 89.47 kB
facebook-www/ReactDOM-prod.classic.js = 593.46 kB 593.25 kB = 104.41 kB 104.40 kB
facebook-www/ReactDOM-prod.modern.js = 569.84 kB 569.64 kB = 100.80 kB 100.78 kB
test_utils/ReactAllWarnings.js Deleted 64.27 kB 0.00 kB Deleted 16.06 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
test_utils/ReactAllWarnings.js Deleted 64.27 kB 0.00 kB Deleted 16.06 kB 0.00 kB

Generated by :no_entry_sign: dangerJS against abd486f97711aec7ae8b1bcb59208f5d99278b0c

react-sizebot avatar May 22 '24 19:05 react-sizebot