GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Track which fibers scheduled the current render work by bvaughn · Pull Request #15658 · react/react

Conversation

@bvaughn

@bvaughn bvaughn commented May 15, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This PR introduces the concept of tracking which Fiber(s) schedule work with React.

Tracked Fibers are called "updaters" and are exposed to DevTools via a memoizedUpdaters property on the ReactFiberRoot. The implementation of this feature follows a vaguely similar approach as interaction tracing, but does not require reference counting since there is no subscriptions API.

This change is in support of a new DevTools Profiler feature that shows which Fiber(s) scheduled the selected commit in the Profiler.

All changes have been gated behind a new feature flag, enableUpdaterTracking, which is enabled for Profiling builds by default. We also only track updaters when DevTools has been detected, to avoid doing unnecessary work.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Jessidhia reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bvaughn bvaughn mentioned this pull request May 15, 2019
Profiler shows which fibers scheduled an update, and why a given component rendered (do not merge) bvaughn/react-devtools-experimental#269
Closed
@sizebot

sizebot commented May 15, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

ReactDOM: size: 0.0%, gzip: 🔺+0.1%

Details of bundled changes.

Comparing: 50b50c2...91b3678

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.5% +0.3% 848.29 KB 852.15 KB 193.3 KB 193.92 KB UMD_DEV
react-dom.production.min.js 0.0% 🔺+0.1% 105.07 KB 105.11 KB 34.14 KB 34.18 KB UMD_PROD
react-dom.profiling.min.js +0.6% +0.6% 108.25 KB 108.94 KB 35.18 KB 35.4 KB UMD_PROFILING
react-dom.development.js +0.5% +0.3% 842.61 KB 846.47 KB 191.74 KB 192.36 KB NODE_DEV
react-dom.production.min.js 0.0% 🔺+0.1% 105.07 KB 105.09 KB 33.58 KB 33.6 KB NODE_PROD
react-dom.profiling.min.js +0.6% +0.6% 108.43 KB 109.1 KB 34.45 KB 34.65 KB NODE_PROFILING
ReactDOM-dev.js +0.5% +0.3% 868.13 KB 872.09 KB 193.34 KB 194 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.2% 🔺+0.1% 353.02 KB 353.79 KB 65.32 KB 65.4 KB FB_WWW_PROD
ReactDOM-profiling.js +1.1% +1.0% 358.16 KB 362.28 KB 66.29 KB 66.93 KB FB_WWW_PROFILING
react-dom-unstable-fire.development.js +0.5% +0.3% 848.64 KB 852.5 KB 193.44 KB 194.06 KB UMD_DEV
react-dom-unstable-fire.production.min.js 0.0% 🔺+0.1% 105.09 KB 105.13 KB 34.15 KB 34.19 KB UMD_PROD
react-dom-unstable-fire.profiling.min.js +0.6% +0.6% 108.26 KB 108.95 KB 35.18 KB 35.41 KB UMD_PROFILING
react-dom-unstable-fire.development.js +0.5% +0.3% 842.96 KB 846.81 KB 191.88 KB 192.5 KB NODE_DEV
react-dom-unstable-fire.production.min.js 0.0% 🔺+0.1% 105.08 KB 105.1 KB 33.59 KB 33.61 KB NODE_PROD
react-dom-unstable-fire.profiling.min.js +0.6% +0.6% 108.44 KB 109.11 KB 34.46 KB 34.66 KB NODE_PROFILING
ReactFire-dev.js +0.5% +0.3% 867.34 KB 871.29 KB 193.28 KB 193.95 KB FB_WWW_DEV
ReactFire-prod.js 🔺+0.2% 🔺+0.1% 340.96 KB 341.73 KB 62.93 KB 62.99 KB FB_WWW_PROD
ReactFire-profiling.js +0.8% +0.7% 346.11 KB 348.99 KB 63.88 KB 64.29 KB FB_WWW_PROFILING
react-dom-test-utils.development.js +0.1% +0.1% 56.93 KB 56.98 KB 15.68 KB 15.7 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 🔺+0.1% 10.76 KB 10.76 KB 3.94 KB 3.95 KB UMD_PROD
react-dom-test-utils.development.js +0.1% +0.1% 55.27 KB 55.32 KB 15.36 KB 15.38 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 10.51 KB 10.51 KB 3.88 KB 3.88 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.76 KB 60.76 KB 15.85 KB 15.85 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.69 KB 10.69 KB 3.67 KB 3.67 KB UMD_PROD
react-dom-unstable-native-dependencies.development.js 0.0% 0.0% 60.43 KB 60.43 KB 15.72 KB 15.72 KB NODE_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% 🔺+0.1% 10.43 KB 10.43 KB 3.56 KB 3.57 KB NODE_PROD
react-dom-server.browser.development.js 0.0% +0.1% 137.21 KB 137.26 KB 36.17 KB 36.19 KB UMD_DEV
react-dom-server.browser.development.js 0.0% +0.1% 133.34 KB 133.39 KB 35.23 KB 35.25 KB NODE_DEV
ReactDOMServer-dev.js 0.0% 0.0% 135.54 KB 135.54 KB 34.8 KB 34.81 KB FB_WWW_DEV
ReactDOMServer-prod.js 0.0% 0.0% 47.98 KB 47.98 KB 11.04 KB 11.04 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% +0.1% 135.28 KB 135.33 KB 35.78 KB 35.8 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% -0.0% 19.98 KB 19.98 KB 7.53 KB 7.53 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.81 KB 3.81 KB 1.54 KB 1.54 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.21 KB 1.21 KB 705 B 707 B UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 3.64 KB 3.64 KB 1.49 KB 1.49 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.05 KB 1.05 KB 636 B 638 B NODE_PROD
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 3.88 KB 3.88 KB 1.51 KB 1.51 KB NODE_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.1% 1.1 KB 1.1 KB 667 B 668 B NODE_PROD

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-art.development.js +0.7% +0.5% 584.2 KB 588.05 KB 127.86 KB 128.46 KB UMD_DEV
react-art.production.min.js 0.0% 🔺+0.1% 96.76 KB 96.78 KB 29.8 KB 29.83 KB UMD_PROD
react-art.development.js +0.7% +0.5% 515.1 KB 518.96 KB 110.37 KB 110.97 KB NODE_DEV
react-art.production.min.js 0.0% 🔺+0.2% 61.74 KB 61.75 KB 19.06 KB 19.09 KB NODE_PROD
ReactART-dev.js +0.8% +0.6% 525.5 KB 529.46 KB 109.71 KB 110.33 KB FB_WWW_DEV
ReactART-prod.js 🔺+0.3% 🔺+0.2% 201.21 KB 201.76 KB 34.29 KB 34.37 KB FB_WWW_PROD

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js +0.6% +0.4% 657.77 KB 661.73 KB 140.05 KB 140.68 KB RN_FB_DEV
ReactNativeRenderer-prod.js 🔺+0.2% 🔺+0.2% 249.18 KB 249.75 KB 43.36 KB 43.44 KB RN_FB_PROD
ReactNativeRenderer-profiling.js +1.0% +1.0% 257.11 KB 259.76 KB 44.97 KB 45.41 KB RN_FB_PROFILING
ReactNativeRenderer-dev.js +0.6% +0.4% 657.68 KB 661.64 KB 140.02 KB 140.65 KB RN_OSS_DEV
ReactNativeRenderer-prod.js 🔺+0.2% 🔺+0.2% 249.19 KB 249.76 KB 43.36 KB 43.43 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js +1.0% +1.0% 257.12 KB 259.78 KB 44.97 KB 45.41 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.6% +0.5% 646.52 KB 650.48 KB 137.33 KB 137.96 KB RN_FB_DEV
ReactFabric-prod.js 🔺+0.3% 🔺+0.3% 242.37 KB 243.05 KB 42.02 KB 42.15 KB RN_FB_PROD
ReactFabric-profiling.js +1.1% +0.9% 250.31 KB 253.07 KB 43.69 KB 44.1 KB RN_FB_PROFILING
ReactFabric-dev.js +0.6% +0.5% 646.43 KB 650.39 KB 137.3 KB 137.92 KB RN_OSS_DEV
ReactFabric-prod.js 🔺+0.3% 🔺+0.3% 242.38 KB 243.05 KB 42.02 KB 42.15 KB RN_OSS_PROD
ReactFabric-profiling.js +1.1% +0.9% 250.33 KB 253.08 KB 43.69 KB 44.1 KB RN_OSS_PROFILING

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer.development.js +0.7% +0.5% 528.48 KB 532.29 KB 113.22 KB 113.82 KB UMD_DEV
react-test-renderer.production.min.js 0.0% 🔺+0.1% 63.03 KB 63.05 KB 19.46 KB 19.48 KB UMD_PROD
react-test-renderer.development.js +0.7% +0.5% 524.02 KB 527.83 KB 112.11 KB 112.71 KB NODE_DEV
react-test-renderer.production.min.js 0.0% 🔺+0.2% 62.71 KB 62.73 KB 19.25 KB 19.29 KB NODE_PROD
ReactTestRenderer-dev.js +0.7% +0.6% 536.48 KB 540.44 KB 112.19 KB 112.82 KB FB_WWW_DEV
react-test-renderer-shallow.development.js +0.1% +0.2% 41.95 KB 41.99 KB 10.83 KB 10.85 KB UMD_DEV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 11.6 KB 11.6 KB 3.55 KB 3.55 KB UMD_PROD
react-test-renderer-shallow.development.js +0.1% +0.2% 36.08 KB 36.13 KB 9.46 KB 9.48 KB NODE_DEV
react-test-renderer-shallow.production.min.js 0.0% 0.0% 11.74 KB 11.74 KB 3.67 KB 3.67 KB NODE_PROD

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js +0.8% +0.6% 512.21 KB 516.07 KB 108.79 KB 109.41 KB NODE_DEV
react-reconciler.production.min.js 0.0% 🔺+0.2% 62.74 KB 62.76 KB 18.85 KB 18.89 KB NODE_PROD
react-reconciler-persistent.development.js +0.7% +0.6% 509.89 KB 513.7 KB 107.78 KB 108.39 KB NODE_DEV
react-reconciler-persistent.production.min.js 0.0% 🔺+0.2% 62.75 KB 62.77 KB 18.86 KB 18.89 KB NODE_PROD
react-reconciler-reflection.development.js +0.2% +0.3% 19.16 KB 19.21 KB 6.08 KB 6.1 KB NODE_DEV
react-reconciler-reflection.production.min.js 0.0% 🔺+0.1% 2.51 KB 2.51 KB 1.11 KB 1.12 KB NODE_PROD

Generated by 🚫 dangerJS

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@facebook-github-bot facebook-github-bot added the CLA Signed label May 15, 2019
@bvaughn
bvaughn force-pushed the scheduler-tracking branch from 523f00d to fa0d5b1 Compare May 15, 2019 17:33
@bvaughn bvaughn mentioned this pull request May 15, 2019
Show commit priority levels in Profiler UI (if available) bvaughn/react-devtools-experimental#274
Merged
@bvaughn bvaughn changed the title [WIP] Profiler proof of concept (do not merge) Track which fibers scheduled the current render work May 16, 2019
@bvaughn
bvaughn force-pushed the scheduler-tracking branch from 813348d to 6145677 Compare May 16, 2019 20:15
@bvaughn
bvaughn requested review from acdlite and sebmarkbage May 16, 2019 20:20
@bvaughn
bvaughn force-pushed the scheduler-tracking branch 2 times, most recently from efc6f2e to f0562c7 Compare May 16, 2019 20:48
@bvaughn

bvaughn commented May 18, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

I think there's a cycle here in some cases where flushing pending updates can cause the updater to get lost. I can reliably reproduce it in a small test app (below). If I type a couple of characters, I'll get a commit with no updaters.

function Input() {
  const [text, setText] = useState('');
  const handleChange = event => setText(event.currentTarget.value);
  // To reproduce the bug, type (more than once) into the input below.
  return <input type="text" value={text} onChange={handleChange} />;
}

// The bug doesn't occur in a sync root:
// render(<Input />, document.getElementById('root'));

const root = createRoot(document.getElementById('root'));
root.render(<Input />);

Haven't been able to catch it in a test yet, because the flushing behavior is different.

I think I have a fix for this but I would feel better about it if I could capture the broken behavior in a test first.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn

bvaughn commented May 18, 2019

Copy link
Copy Markdown
Contributor Author

Okay. I think I captured a variant of the bug in a new test (failing before) and fixed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn
bvaughn force-pushed the scheduler-tracking branch from 0602449 to 91b3678 Compare May 20, 2019 16:21
@bvaughn

bvaughn commented May 20, 2019

Copy link
Copy Markdown
Contributor Author

Rebased after #15664 landed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@acdlite

acdlite commented May 20, 2019

Copy link
Copy Markdown
Collaborator

I'm going to defer to @sebmarkbage to review this since I think you discussed the overall approach with him already

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn

bvaughn commented May 20, 2019

Copy link
Copy Markdown
Contributor Author

Lucky @sebmarkbage 🎉

gaearon, NE-SmallTown, and Jessidhia reacted with laugh emoji
All reactions
  • 😄 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn

bvaughn commented May 29, 2019

Copy link
Copy Markdown
Contributor Author

Ping @sebmarkbage 😄

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@necolas necolas added the React Core Team Opened by a member of the React Core Team label Jan 8, 2020
@bvaughn

bvaughn commented Jan 23, 2020

Copy link
Copy Markdown
Contributor Author

I think this PR is still worth at least considering. Leaving open for now until @sebmarkbage indicates level of interest. (If interested, I'll rebase.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn

bvaughn commented Mar 29, 2021

Copy link
Copy Markdown
Contributor Author

This would have been a useful feature 😄 It's unfortunate that it never got reviewed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gaearon

gaearon commented Mar 29, 2021

Copy link
Copy Markdown
Collaborator

I can review it! I don't think I've seen it before. I doubt Seb sees GH mentions. :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn

bvaughn commented Mar 30, 2021

Copy link
Copy Markdown
Contributor Author

I don't think I've seen it before.

Screen Shot 2021-03-29 at 10 24 26 PM

🤣 At least I'm not the only one who does this!

Thanks for the offer Dan! I'll clean it up sometime this week and ping you.

NE-SmallTown, gaearon, and tjallingt reacted with laugh emoji
All reactions
  • 😄 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gaearon

gaearon commented Mar 30, 2021

Copy link
Copy Markdown
Collaborator

It’s been... a while.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn

bvaughn commented Apr 1, 2021

Copy link
Copy Markdown
Contributor Author

Well fortunately, only....everything...has changed since I wrote this. Should not be a problem.

gaearon reacted with laugh emoji
All reactions
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn
bvaughn marked this pull request as draft April 1, 2021 02:56
@bvaughn bvaughn changed the title Track which fibers scheduled the current render work [draft] Track which fibers scheduled the current render work Apr 1, 2021
@bvaughn

bvaughn commented Apr 1, 2021

Copy link
Copy Markdown
Contributor Author

I'm returning this to draft status while I work on rebasing and updating the expiration times logic to lanes logic.

gaearon reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn
bvaughn force-pushed the scheduler-tracking branch from 91b3678 to 373acb6 Compare April 2, 2021 13:19
bvaughn
bvaughn commented Apr 2, 2021
View reviewed changes
Comment thread packages/react-reconciler/src/ReactFiberLane.new.js
Comment on lines +750 to +800
export function addFiberToLanesMap(
root: FiberRoot,
fiber: Fiber,
lanes: Lanes | Lane,
) {
if (enableUpdaterTracking) {
if (isDevToolsPresent) {
const pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;
while (lanes > 0) {
const index = laneToIndex(lanes);
const lane = 1 << index;

const updaters = pendingUpdatersLaneMap[index];
updaters.add(fiber);

lanes &= ~lane;
}
}
}
}

export function movePendingFibersToMemoized(root: FiberRoot, lanes: Lanes) {
if (enableUpdaterTracking) {
if (isDevToolsPresent) {
const pendingUpdatersLaneMap = root.pendingUpdatersLaneMap;
const memoizedUpdaters = root.memoizedUpdaters;
while (lanes > 0) {
const index = laneToIndex(lanes);
const lane = 1 << index;

const updaters = pendingUpdatersLaneMap[index];
if (updaters.size > 0) {
updaters.forEach(fiber => {
const alternate = fiber.alternate;
if (alternate === null || !memoizedUpdaters.has(alternate)) {
memoizedUpdaters.add(fiber);
}
});
updaters.clear();
}

lanes &= ~lane;
}
}
}
}

@bvaughn bvaughn Apr 2, 2021

Copy link
Copy Markdown
Contributor Author

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.

It seemed best to put these functions in ReactFiberLane so they had access to laneToIndex to make lanes->indices mapping easier.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
sebmarkbage
sebmarkbage reviewed Apr 2, 2021
View reviewed changes
Comment thread packages/react-reconciler/src/ReactFiberCommitWork.new.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn

bvaughn commented Apr 2, 2021

Copy link
Copy Markdown
Contributor Author

But as I read it, this is really mostly because we want to track it through retries of Suspense and Offscreen. Is that right?

Yes.

I wonder if this would be more scoped if we did it that way. We could store the parents that participated in an update on an internal context and then snapshot that on the Suspense/Offscreen/Hydrating boundary.

Then devtools would pick up this info in the traversal of the commit either from the updated hook or the suspense boundary that was retries.

Some initial concern at the idea of maintaining that over time, across React versions. Seems like the internal logic of Suspense (and Offscreen) has already changed a lot and will likely be changing more (e.g. with effects semantics) – something explicit feels more future proof.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn
bvaughn force-pushed the scheduler-tracking branch from f892d9b to 6aeb775 Compare April 2, 2021 21:55
@bvaughn bvaughn changed the title [draft] Track which fibers scheduled the current render work Track which fibers scheduled the current render work Apr 2, 2021
@bvaughn
bvaughn marked this pull request as ready for review April 2, 2021 21:56
@bvaughn bvaughn mentioned this pull request Apr 2, 2021
DevTools shows which fibers scheduled the current update #21171
Merged
@bvaughn
bvaughn force-pushed the scheduler-tracking branch from 6aeb775 to 0c6681e Compare April 3, 2021 13:18
@bvaughn bvaughn assigned sebmarkbage Apr 3, 2021
@bvaughn

bvaughn commented Apr 3, 2021

Copy link
Copy Markdown
Contributor Author

CI failure is unrelated to code changes:

Error response from daemon: Get https://registry-1.docker.io/v2/circleci/openjdk/manifests/8-jdk-node-browsers: Get https://auth.docker.io/token?account=circlecidockerdefaultreadonly&scope=repository%3Acircleci%2Fopenjdk%3Apull&service=registry.docker.io: EOF

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn bvaughn mentioned this pull request Apr 3, 2021
Bug: DevTools settings dialog no longer opens #21172
Closed
@bvaughn
bvaughn requested a review from sebmarkbage April 5, 2021 15:10
@bvaughn
bvaughn force-pushed the scheduler-tracking branch 2 times, most recently from cbcc3f5 to 8ef9fe9 Compare April 7, 2021 13:09
@bvaughn bvaughn assigned acdlite Apr 9, 2021
@bvaughn

bvaughn commented Apr 9, 2021

Copy link
Copy Markdown
Contributor Author

Can I get a review of this please? :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bvaughn
bvaughn force-pushed the scheduler-tracking branch from 8ef9fe9 to 8c058c7 Compare April 9, 2021 14:06
Brian Vaughn
Track which fibers scheduled the current render work
cbcbfbe
This change is gated behind a new profiling-mode-only feature flag, "enableUpdaterTracking".
@bvaughn
bvaughn force-pushed the scheduler-tracking branch from 8c058c7 to cbcbfbe Compare April 9, 2021 14:15
sebmarkbage
sebmarkbage approved these changes Apr 9, 2021
View reviewed changes

@sebmarkbage sebmarkbage left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

We can discuss alternative approaches that may or may not be more accurate for a longer term solution but don't want to block the UI features.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bvaughn reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bvaughn

bvaughn commented Apr 9, 2021

Copy link
Copy Markdown
Contributor Author

Much appreciated!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Brian Vaughn
DCE updater tracking code from Facebook production bundle
ff40a42
@bvaughn
bvaughn merged commit dc108b0 into react:master Apr 9, 2021
@bvaughn
bvaughn deleted the scheduler-tracking branch April 9, 2021 14:34
facebook-github-bot pushed a commit to react/react-native that referenced this pull request Apr 20, 2021
Andrei Shikov @facebook-github-bot
React Native sync for revisions c9aab1c...f7cdc89
de318cd
Summary:
This sync includes the following changes:
- **[f7cdc89](react/react@f7cdc8936 )**: Also turn off enableSyncDefaultUpdates in RN test renderer ([#21293](react/react#21293)) //<Ricky>//
- **[4c9eb2a](react/react@4c9eb2af1 )**: Add dynamic flags to React Native ([#21291](react/react#21291)) //<Ricky>//
- **[9eddfbf](react/react@9eddfbf5a )**: [Fizz] Two More Fixes ([#21288](react/react#21288)) //<Sebastian Markbåge>//
- **[11b0759](react/react@11b07597e )**: Fix classes ([#21283](react/react#21283)) //<Sebastian Markbåge>//
- **[96d00b9](react/react@96d00b9bb )**: [Fizz] Random Fixes ([#21277](react/react#21277)) //<Sebastian Markbåge>//
- **[81ef539](react/react@81ef53953 )**: Always insert a dummy node with an ID into fallbacks ([#21272](react/react#21272)) //<Sebastian Markbåge>//
- **[a4a940d](react/react@a4a940d7a )**: [Fizz] Add unsupported Portal/Scope components ([#21261](react/react#21261)) //<Sebastian Markbåge>//
- **[f4d7a0f](react/react@f4d7a0f1e )**: Implement useOpaqueIdentifier ([#21260](react/react#21260)) //<Sebastian Markbåge>//
- **[dde875d](react/react@dde875dfb )**: [Fizz] Implement Hooks ([#21257](react/react#21257)) //<Sebastian Markbåge>//
- **[a597c2f](react/react@a597c2f5d )**: [Fizz] Fix reentrancy bug ([#21270](react/react#21270)) //<Sebastian Markbåge>//
- **[15e779d](react/react@15e779d92 )**: Reconciler should inject its own version into DevTools hook ([#21268](react/react#21268)) //<Brian Vaughn>//
- **[4f76a28](react/react@4f76a28c9 )**: [Fizz] Implement New Context ([#21255](react/react#21255)) //<Sebastian Markbåge>//
- **[82ef450](react/react@82ef450e0 )**: remove obsolete SharedArrayBuffer ESLint config ([#21259](react/react#21259)) //<Henry Q. Dineen>//
- **[dbadfa2](react/react@dbadfa2c3 )**: [Fizz] Classes Follow Up ([#21253](react/react#21253)) //<Sebastian Markbåge>//
- **[686b635](react/react@686b635b7 )**: Prevent reading canonical property of null ([#21242](react/react#21242)) //<Joshua Gross>//
- **[bb88ce9](react/react@bb88ce95a )**: Bugfix: Don't rely on `finishedLanes` for passive effects ([#21233](react/react#21233)) //<Andrew Clark>//
- **[343710c](react/react@343710c92 )**: [Fizz] Fragments and Iterable support ([#21228](react/react#21228)) //<Sebastian Markbåge>//
- **[933880b](react/react@933880b45 )**: Make time-slicing opt-in ([#21072](react/react#21072)) //<Ricky>//
- **[b0407b5](react/react@b0407b55f )**: Support more empty types ([#21225](react/react#21225)) //<Sebastian Markbåge>//
- **[3971371](react/react@39713716a )**: Merge isObject branches ([#21226](react/react#21226)) //<Sebastian Markbåge>//
- **[8a4a59c](react/react@8a4a59c72 )**: Remove textarea special case from child fiber ([#21222](react/react#21222)) //<Sebastian Markbåge>//
- **[dc108b0](react/react@dc108b0f5 )**: Track which fibers scheduled the current render work ([#15658](react/react#15658)) //<Brian Vaughn>//
- **[6ea7491](react/react@6ea749170 )**: Fix typo in comment ([#21214](react/react#21214)) //<inokawa>//
- **[b38ac13](react/react@b38ac13f9 )**: DevTools: Add post-commit hook ([#21183](react/react#21183)) //<Brian Vaughn>//
- **[b943aeb](react/react@b943aeba8 )**: Fix: Passive effect updates are never sync ([#21215](react/react#21215)) //<Andrew Clark>//
- **[d389c54](react/react@d389c54d1 )**: Offscreen: Use JS stack to track hidden/unhidden subtree state ([#21211](react/react#21211)) //<Brian Vaughn>//
- **[c486dc1](react/react@c486dc1a4 )**: Remove unnecessary processUpdateQueue ([#21199](react/react#21199)) //<Sebastian Markbåge>//
- **[cf45a62](react/react@cf45a623a )**: [Fizz] Implement Classes ([#21200](react/react#21200)) //<Sebastian Markbåge>//
- **[75c6165](react/react@75c616554 )**: Include actual type of `Profiler#id` on type mismatch ([#20306](react/react#20306)) //<Sebastian Silbermann>//
- **[1214b30](react/react@1214b302e )**: test: Fix "couldn't locate all inline snapshots" ([#21205](react/react#21205)) //<Sebastian Silbermann>//
- **[1a02d27](react/react@1a02d2792 )**: style: delete unused isHost check ([#21203](react/react#21203)) //<wangao>//
- **[782f689](react/react@782f689ca )**: Don't double invoke getDerivedStateFromProps for module pattern ([#21193](react/react#21193)) //<Sebastian Markbåge>//
- **[e90c76a](react/react@e90c76a65 )**: Revert "Offscreen: Use JS stack to track hidden/unhidden subtree state" ([#21194](react/react#21194)) //<Brian Vaughn>//
- **[1f8583d](react/react@1f8583de8 )**: Offscreen: Use JS stack to track hidden/unhidden subtree state ([#21192](react/react#21192)) //<Brian Vaughn>//
- **[ad6e6ec](react/react@ad6e6ec7b )**: [Fizz] Prepare Recursive Loop for More Types ([#21186](react/react#21186)) //<Sebastian Markbåge>//
- **[172e89b](react/react@172e89b4b )**: Reland Remove redundant initial of isArray ([#21188](react/react#21188)) //<Sebastian Markbåge>//
- **[7c1ba2b](react/react@7c1ba2b57 )**: Proposed new Suspense layout effect semantics ([#21079](react/react#21079)) //<Brian Vaughn>//
- **[316aa36](react/react@316aa3686 )**: [Scheduler] Fix de-opt caused by out-of-bounds access ([#21147](react/react#21147)) //<Andrey Marchenko>//
- **[b4f119c](react/react@b4f119cdf )**: Revert "Remove redundant initial of isArray ([#21163](react/react#21163))" //<Sebastian Markbage>//
- **[c031970](react/react@c03197063 )**: Revert "apply prettier ([#21165](react/react#21165))" //<Sebastian Markbage>//
- **[94fd121](react/react@94fd1214d )**: apply prettier ([#21165](react/react#21165)) //<Behnam Mohammadi>//
- **[b130a0f](react/react@b130a0f5c )**: Remove redundant initial of isArray ([#21163](react/react#21163)) //<Behnam Mohammadi>//
- **[2c9fef3](react/react@2c9fef32d )**: Remove redundant initial of hasOwnProperty ([#21134](react/react#21134)) //<Behnam Mohammadi>//
- **[1cf9978](react/react@1cf9978d8 )**: Don't pass internals to callbacks ([#21161](react/react#21161)) //<Sebastian Markbåge>//
- **[b9e4c10](react/react@b9e4c10e9 )**: [Fizz] Implement all the DOM attributes and special cases ([#21153](react/react#21153)) //<Sebastian Markbåge>//
- **[f8ef4ff](react/react@f8ef4ff57 )**: Flush discrete passive effects before paint ([#21150](react/react#21150)) //<Andrew Clark>//
- **[b48b38a](react/react@b48b38af6 )**: Support nesting of startTransition and flushSync (alt) ([#21149](react/react#21149)) //<Sebastian Markbåge>//

Changelog:
[General][Changed] - React Native sync for revisions c9aab1c...f7cdc89

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii

Differential Revision: D27740113

fbshipit-source-id: 6e27204d78e3e16ed205170006cb97c0d6bfa957
@bvaughn bvaughn mentioned this pull request May 25, 2021
Enable the updater-tracking feature flag in more builds #21567
Merged
koto pushed a commit to koto/react that referenced this pull request Jun 15, 2021
Brian Vaughn @koto
Track which fibers scheduled the current render work (react#15658)
eb54c62
Tracked Fibers are called "updaters" and are exposed to DevTools via a 'memoizedUpdaters' property on the ReactFiberRoot. The implementation of this feature follows a vaguely similar approach as interaction tracing, but does not require reference counting since there is no subscriptions API.

This change is in support of a new DevTools Profiler feature that shows which Fiber(s) scheduled the selected commit in the Profiler.

All changes have been gated behind a new feature flag, 'enableUpdaterTracking', which is enabled for Profiling builds by default. We also only track updaters when DevTools has been detected, to avoid doing unnecessary work.
@bvaughn bvaughn mentioned this pull request Mar 3, 2022
Update React experimental version Shopify/hydrogen-v1#758
Merged
4 tasks
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
Brian Vaughn
Track which fibers scheduled the current render work (react#15658)
8190927
Tracked Fibers are called "updaters" and are exposed to DevTools via a 'memoizedUpdaters' property on the ReactFiberRoot. The implementation of this feature follows a vaguely similar approach as interaction tracing, but does not require reference counting since there is no subscriptions API.

This change is in support of a new DevTools Profiler feature that shows which Fiber(s) scheduled the selected commit in the Profiler.

All changes have been gated behind a new feature flag, 'enableUpdaterTracking', which is enabled for Profiling builds by default. We also only track updaters when DevTools has been detected, to avoid doing unnecessary work.
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
Brian Vaughn
Track which fibers scheduled the current render work (react#15658)
dc7cce4
Tracked Fibers are called "updaters" and are exposed to DevTools via a 'memoizedUpdaters' property on the ReactFiberRoot. The implementation of this feature follows a vaguely similar approach as interaction tracing, but does not require reference counting since there is no subscriptions API.

This change is in support of a new DevTools Profiler feature that shows which Fiber(s) scheduled the selected commit in the Profiler.

All changes have been gated behind a new feature flag, 'enableUpdaterTracking', which is enabled for Profiling builds by default. We also only track updaters when DevTools has been detected, to avoid doing unnecessary work.
@rickhanlonii rickhanlonii mentioned this pull request Nov 23, 2026
[Legacy Mode] Migrate legacy tests to concurrent mode #38380
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@acdlite acdlite Awaiting requested review from acdlite
@gaearon gaearon Awaiting requested review from gaearon
1 more reviewer
@sebmarkbage sebmarkbage sebmarkbage approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@sebmarkbage sebmarkbage

@gaearon gaearon

@acdlite acdlite

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@bvaughn @sizebot @acdlite @gaearon @sebmarkbage @necolas @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.