Skip to content
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

Merged
merged 3 commits into from
Apr 22, 2020

Conversation

sebmarkbage
Copy link
Collaborator

@sebmarkbage sebmarkbage commented Apr 22, 2020

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.

@sebmarkbage sebmarkbage requested a review from acdlite April 22, 2020 02:47
@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Apr 22, 2020
@@ -207,9 +202,6 @@ export function createUpdate(

next: null,
};
if (__DEV__) {
update.priority = getCurrentPriorityLevel();
Copy link
Collaborator Author

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.

Copy link
Collaborator

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

Copy link
Collaborator

@acdlite acdlite Apr 22, 2020

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.

Copy link
Contributor

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:

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?

@codesandbox-ci
Copy link

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:

Sandbox Source
sleepy-tree-ep6jw Configuration

@acdlite
Copy link
Collaborator

acdlite commented Apr 22, 2020

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__;
Copy link
Collaborator

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nvm :)

Copy link
Collaborator

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

Copy link
Collaborator Author

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.

@sizebot
Copy link

sizebot commented Apr 22, 2020

Details of bundled changes.

Comparing: e5cc146...1858929

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.profiling.min.js 0.0% 0.0% 128.69 KB 128.69 KB 40.22 KB 40.23 KB NODE_PROFILING
ReactDOM-dev.js 0.0% 0.0% 1013.04 KB 1013.04 KB 226.41 KB 226.41 KB FB_WWW_DEV
ReactDOMServer-dev.js 0.0% 0.0% 159.99 KB 159.99 KB 40.72 KB 40.72 KB FB_WWW_DEV
ReactDOMServer-prod.js 0.0% 0.0% 52.03 KB 52.03 KB 12.53 KB 12.53 KB FB_WWW_PROD
react-dom-unstable-fizz.node.development.js 0.0% +0.2% 5.42 KB 5.42 KB 1.81 KB 1.81 KB NODE_DEV
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.1% 1.17 KB 1.17 KB 668 B 669 B NODE_PROD
react-dom-test-utils.development.js 0.0% 0.0% 75.14 KB 75.14 KB 20.13 KB 20.14 KB UMD_DEV
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 5.17 KB 5.17 KB 1.75 KB 1.75 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 13.24 KB 13.24 KB 4.9 KB 4.9 KB UMD_PROD
ReactDOMTesting-dev.js 0.0% 0.0% 908.67 KB 908.67 KB 203.24 KB 203.25 KB FB_WWW_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.2 KB 1.2 KB 705 B 707 B UMD_PROD
ReactDOMTesting-prod.js 0.0% 0.0% 378.65 KB 378.65 KB 69.3 KB 69.3 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% 0.0% 69.98 KB 69.98 KB 19.63 KB 19.63 KB NODE_DEV
ReactDOMTesting-profiling.js 0.0% 0.0% 378.65 KB 378.65 KB 69.3 KB 69.3 KB FB_WWW_PROFILING
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 4.68 KB 4.68 KB 1.65 KB 1.65 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 13.12 KB 13.12 KB 4.81 KB 4.81 KB NODE_PROD
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.02 KB 1.02 KB 617 B 619 B NODE_PROD
react-dom-server.node.development.js 0.0% 0.0% 153.6 KB 153.6 KB 40.66 KB 40.66 KB NODE_DEV
react-dom.development.js 0.0% 0.0% 940.6 KB 940.6 KB 206.17 KB 206.17 KB UMD_DEV
react-dom-server.browser.development.js 0.0% 0.0% 161.88 KB 161.88 KB 41.17 KB 41.18 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 124.5 KB 124.5 KB 39.8 KB 39.8 KB UMD_PROD
ReactDOMForked-dev.js -0.8% -0.6% 1013.05 KB 1005.06 KB 226.58 KB 225.13 KB FB_WWW_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 23.4 KB 23.4 KB 8.6 KB 8.6 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 128.35 KB 128.35 KB 41 KB 41 KB UMD_PROFILING
react-dom.development.js 0.0% 0.0% 895.51 KB 895.51 KB 203.6 KB 203.6 KB NODE_DEV
ReactDOMForked-profiling.js 0.0% 0.0% 431.36 KB 431.36 KB 75.87 KB 75.87 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 152.38 KB 152.38 KB 40.4 KB 40.4 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 124.69 KB 124.69 KB 38.98 KB 38.98 KB NODE_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against 1858929

@sizebot
Copy link

sizebot commented Apr 22, 2020

Details of bundled changes.

Comparing: e5cc146...1858929

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.production.min.js 0.0% 0.0% 119.86 KB 119.86 KB 37.59 KB 37.59 KB NODE_PROD
react-dom-test-utils.development.js 0.0% 0.0% 75.13 KB 75.13 KB 20.13 KB 20.13 KB UMD_DEV
ReactDOMTesting-profiling.js 0.0% 0.0% 390.84 KB 390.84 KB 71.33 KB 71.33 KB FB_WWW_PROFILING
react-dom-server.node.production.min.js 0.0% 0.0% 23.24 KB 23.24 KB 8.65 KB 8.65 KB NODE_PROD
react-dom.profiling.min.js 0.0% 0.0% 123.74 KB 123.74 KB 38.75 KB 38.75 KB NODE_PROFILING
react-dom-test-utils.production.min.js 0.0% 0.0% 13.23 KB 13.23 KB 4.89 KB 4.9 KB UMD_PROD
ReactDOMServer-prod.js 0.0% 0.0% 52.92 KB 52.92 KB 12.71 KB 12.72 KB FB_WWW_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 4.67 KB 4.67 KB 1.64 KB 1.64 KB NODE_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1 KB 1 KB 609 B 611 B NODE_PROD
ReactDOMForked-dev.js -0.8% -0.6% 1.01 MB 1.01 MB 231.71 KB 230.25 KB FB_WWW_DEV
react-dom.production.min.js 0.0% 0.0% 119.74 KB 119.74 KB 38.36 KB 38.36 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 123.49 KB 123.49 KB 39.57 KB 39.57 KB UMD_PROFILING
ReactDOMTesting-dev.js 0.0% 0.0% 935.54 KB 935.54 KB 208.72 KB 208.72 KB FB_WWW_DEV
react-dom.development.js 0.0% 0.0% 863.27 KB 863.27 KB 197.18 KB 197.18 KB NODE_DEV
ReactDOMTesting-prod.js 0.0% 0.0% 390.84 KB 390.84 KB 71.33 KB 71.33 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% 0.0% 146.84 KB 146.84 KB 38.9 KB 38.91 KB NODE_DEV
ReactDOM-dev.js 0.0% 0.0% 1.01 MB 1.01 MB 231.53 KB 231.53 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% 0.0% 69.97 KB 69.97 KB 19.62 KB 19.62 KB NODE_DEV
react-dom-unstable-fizz.node.development.js 0.0% +0.2% 5.41 KB 5.41 KB 1.8 KB 1.8 KB NODE_DEV
ReactDOM-profiling.js 0.0% 0.0% 442.2 KB 442.2 KB 77.73 KB 77.73 KB FB_WWW_PROFILING
react-dom-test-utils.production.min.js 0.0% 0.0% 13.1 KB 13.1 KB 4.8 KB 4.8 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% 🔺+0.3% 1.16 KB 1.16 KB 659 B 661 B NODE_PROD
react-dom-server.browser.production.min.js 0.0% 0.0% 22.94 KB 22.94 KB 8.52 KB 8.52 KB UMD_PROD
react-dom-server.browser.development.js 0.0% 0.0% 145.63 KB 145.63 KB 38.65 KB 38.65 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 22.83 KB 22.83 KB 8.49 KB 8.49 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 5.15 KB 5.15 KB 1.74 KB 1.74 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.4% 1.19 KB 1.19 KB 697 B 700 B UMD_PROD

ReactDOM: size: 0.0%, gzip: 0.0%

Size changes (stable)

Generated by 🚫 dangerJS against 1858929

@sebmarkbage sebmarkbage merged commit 571f5ad into facebook:master Apr 22, 2020
bvaughn pushed a commit to bvaughn/react that referenced this pull request Jun 16, 2020
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.
bvaughn pushed a commit that referenced this pull request Jun 16, 2020
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.
bvaughn pushed a commit to bvaughn/react that referenced this pull request Jun 19, 2020
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.
bvaughn pushed a commit to bvaughn/react that referenced this pull request Jun 19, 2020
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.
trueadm pushed a commit to trueadm/react that referenced this pull request Jun 22, 2020
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.
bvaughn pushed a commit that referenced this pull request Jun 23, 2020
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants