-
Notifications
You must be signed in to change notification settings - Fork 47.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Temporarily Remove DebugTracing from the New Reconciler #18697
Conversation
@@ -207,9 +202,6 @@ export function createUpdate( | |||
|
|||
next: null, | |||
}; | |||
if (__DEV__) { | |||
update.priority = getCurrentPriorityLevel(); |
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.
btw, are we actually using these in DevTools? I thought we added them for DevTools but I couldn't find any usage of them.
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 was added for the Suspense priority warning, which we later removed
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 don't need it in the new system because the priority can be determined from the lane "losslessly" without having to infer.
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.
I think the only place DevTools surfaces priority level info is in the Profiler, per commit:
react/packages/react-reconciler/src/ReactFiberDevToolsHook.old.js
Lines 85 to 102 in 571f5ad
export function onCommitRoot(root: FiberRoot, expirationTime: ExpirationTime) { | |
if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') { | |
try { | |
const didError = (root.current.effectTag & DidCapture) === DidCapture; | |
if (enableProfilerTimer) { | |
const currentTime = getCurrentTime(); | |
const priorityLevel = inferPriorityFromExpirationTime( | |
currentTime, | |
expirationTime, | |
); | |
injectedHook.onCommitFiberRoot( | |
rendererID, | |
root, | |
priorityLevel, | |
didError, | |
); | |
} else { | |
injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError); |
Maybe that's what you were thinking of?
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1858929:
|
Assuming the tests pass. I assume they will because they are already gated on the flag. |
@@ -19,7 +19,7 @@ export const disableInputAttributeSyncing = __VARIANT__; | |||
export const enableFilterEmptyStringAttributesDOM = __VARIANT__; | |||
export const enableModernEventSystem = __VARIANT__; | |||
export const enableLegacyFBSupport = __VARIANT__; | |||
export const enableDebugTracing = __VARIANT__; | |||
export const enableDebugTracing = !__VARIANT__; |
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.
What's the purpose of this?
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.
Oh nvm :)
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.
Funny that means the behavior in the old reconciler wasn't being tested :D
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.
The new reconciler is enabled when the variant is true. This feature doesn't work so the tests don't pass. This ensures it's enabled in the other variant instead.
Details of bundled changes.Comparing: e5cc146...1858929 react-dom
ReactDOM: size: 0.0%, gzip: 0.0% Size changes (experimental) |
Details of bundled changes.Comparing: e5cc146...1858929 react-dom
ReactDOM: size: 0.0%, gzip: 0.0% Size changes (stable) |
It was temporarily removed by @sebmarkbage via PR facebook#18697. Newly re-added tracing is simplified, since the lane(s) data type does not require the (lossy) conversion between priority and expiration time values. @sebmarkbage mentioned that he removed this because it might get in the way of his planned discrete/sync refactor. I'm not sure if that concern still applies, but just in case- I have only re-added it to the old reconciler fork for now.
It was temporarily removed by @sebmarkbage via PR #18697. Newly re-added tracing is simplified, since the lane(s) data type does not require the (lossy) conversion between priority and expiration time values. @sebmarkbage mentioned that he removed this because it might get in the way of his planned discrete/sync refactor. I'm not sure if that concern still applies, but just in case- I have only re-added it to the old reconciler fork for now.
It was temporarily removed by @sebmarkbage via PR facebook#18697. Newly re-added tracing is simplified, since the lane(s) data type does not require the (lossy) conversion between priority and expiration time values. @sebmarkbage mentioned that he removed this because it might get in the way of his planned discrete/sync refactor. I'm not sure if that concern still applies, but just in case- I have only re-added it to the old reconciler fork for now.
It was temporarily removed by @sebmarkbage via PR facebook#18697. Newly re-added tracing is simplified, since the lane(s) data type does not require the (lossy) conversion between priority and expiration time values. @sebmarkbage mentioned that he removed this because it might get in the way of his planned discrete/sync refactor. I'm not sure if that concern still applies, but just in case- I have only re-added it to the old reconciler fork for now.
It was temporarily removed by @sebmarkbage via PR facebook#18697. Newly re-added tracing is simplified, since the lane(s) data type does not require the (lossy) conversion between priority and expiration time values. @sebmarkbage mentioned that he removed this because it might get in the way of his planned discrete/sync refactor. I'm not sure if that concern still applies, but just in case- I have only re-added it to the old reconciler fork for now.
* Re-enabled DebugTracing feature for old reconciler fork It was temporarily removed by @sebmarkbage via PR #18697. Newly re-added tracing is simplified, since the lane(s) data type does not require the (lossy) conversion between priority and expiration time values. @sebmarkbage mentioned that he removed this because it might get in the way of his planned discrete/sync refactor. I'm not sure if that concern still applies, but just in case- I have only re-added it to the old reconciler fork for now. * Force Code Sandbox CI to re-run
Sorry @bvaughn and @gaearon. 😢We can add it back.
Some of the concepts are changing. E.g. getting the current priority level isn't as obviously going to be in the same place. Priority field on update isn't useful anymore since the lanes convey more info. This code is also in all the places moving around. It'll be easier to just add this back than to try to keep them each time they move.