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

Add dedicated LanePriority for Suspense retries #19287

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Jul 8, 2020

A "retry" is a special type of update that attempts to flip a Suspense boundary from its placeholder state back to its primary/resolved state.

Currently, retries are given default priority, using the same algorithm as normal updates and occupying range of lanes.

This adds a new range of lanes dedicated specifically to retries, and gives them lower priority than normal updates.

A couple of existing tests were affected because retries are no longer batched with normal updates; they commit in separate batches.

Not totally satisfied with this design, but I think things will snap more into place once the rest of the Lanes changes (like how we handle parallel Suspense transitions) have settled.

A "retry" is a special type of update that attempts to flip a Suspense
boundary from its placeholder state back to its primary/resolved state.

Currently, retries are given default priority, using the same algorithm
as normal updates and occupying range of lanes.

This adds a new range of lanes dedicated specifically to retries, and
gives them lower priority than normal updates.

A couple of existing tests were affected because retries are no longer
batched with normal updates; they commit in separate batches.

Not totally satisfied with this design, but I think things will snap more
into place once the rest of the Lanes changes (like how we handle
parallel Suspense transitions) have settled.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 8, 2020

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 723cfc8:

Sandbox Source
React Configuration

@sizebot
Copy link

sizebot commented Jul 8, 2020

Details of bundled changes.

Comparing: 40cddfe...723cfc8

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.2% +0.1% 876.4 KB 877.98 KB 200.82 KB 201.12 KB NODE_DEV
ReactDOMForked-prod.js 🔺+0.2% 🔺+0.1% 401.14 KB 401.79 KB 74.25 KB 74.36 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% 0.0% 136.84 KB 136.84 KB 36.39 KB 36.39 KB NODE_DEV
react-dom.production.min.js 🔺+0.1% 🔺+0.2% 118.53 KB 118.66 KB 38.09 KB 38.16 KB NODE_PROD
ReactDOMForked-profiling.js +0.2% +0.1% 411.74 KB 412.38 KB 76.02 KB 76.12 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 142.92 KB 142.92 KB 36.59 KB 36.59 KB UMD_DEV
react-dom-server.node.production.min.js 0.0% 0.0% 20.25 KB 20.25 KB 7.59 KB 7.6 KB NODE_PROD
react-dom-test-utils.production.min.js 0.0% 🔺+0.1% 10.34 KB 10.34 KB 4.06 KB 4.06 KB UMD_PROD
ReactDOMTesting-dev.js +0.2% +0.2% 975.9 KB 977.72 KB 218.41 KB 218.78 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% 0.0% 51.13 KB 51.13 KB 14.89 KB 14.9 KB NODE_DEV
ReactDOMTesting-prod.js 🔺+0.2% 🔺+0.1% 409.12 KB 409.76 KB 76.95 KB 77.05 KB FB_WWW_PROD
react-dom-test-utils.production.min.js 0.0% 0.0% 10.19 KB 10.19 KB 3.98 KB 3.98 KB NODE_PROD
react-dom.development.js +0.2% +0.1% 920.77 KB 922.42 KB 203.2 KB 203.5 KB UMD_DEV
react-dom.production.min.js 🔺+0.1% 🔺+0.2% 118.44 KB 118.57 KB 38.82 KB 38.89 KB UMD_PROD
react-dom.profiling.min.js +0.1% +0.2% 122.34 KB 122.47 KB 40.01 KB 40.09 KB UMD_PROFILING
ReactDOMForked-dev.js +0.2% +0.2% 994.58 KB 996.4 KB 221.89 KB 222.26 KB FB_WWW_DEV
react-dom.profiling.min.js +0.1% +0.2% 122.59 KB 122.72 KB 39.26 KB 39.33 KB NODE_PROFILING
react-dom-server.browser.production.min.js 0.0% 0.0% 19.91 KB 19.91 KB 7.46 KB 7.46 KB UMD_PROD
ReactDOM-dev.js +0.2% +0.2% 1008.5 KB 1010.32 KB 224.14 KB 224.49 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.2% 🔺+0.1% 406.08 KB 406.73 KB 75.24 KB 75.34 KB FB_WWW_PROD
react-dom-server.browser.development.js 0.0% 0.0% 135.57 KB 135.57 KB 36.13 KB 36.14 KB NODE_DEV
ReactDOM-profiling.js +0.2% +0.1% 416.68 KB 417.33 KB 77.04 KB 77.14 KB FB_WWW_PROFILING
react-dom-server.browser.production.min.js 0.0% 0.0% 19.83 KB 19.83 KB 7.44 KB 7.44 KB NODE_PROD
ReactDOMServer-dev.js 0.0% 0.0% 146.85 KB 146.85 KB 37.33 KB 37.33 KB FB_WWW_DEV
ReactDOMServer-prod.js 0.0% 0.0% 47.56 KB 47.56 KB 11.14 KB 11.14 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% 0.0% 55.52 KB 55.52 KB 15.36 KB 15.36 KB UMD_DEV

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-prod.js 🔺+0.2% 🔺+0.3% 252.36 KB 252.99 KB 44.7 KB 44.83 KB FB_WWW_PROD
react-art.development.js +0.2% +0.2% 666.85 KB 668.5 KB 141.98 KB 142.3 KB UMD_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.2% 109.57 KB 109.71 KB 33.92 KB 33.98 KB UMD_PROD
react-art.development.js +0.3% +0.2% 569.24 KB 570.82 KB 124.21 KB 124.51 KB NODE_DEV
react-art.production.min.js 🔺+0.2% 🔺+0.3% 74.53 KB 74.67 KB 23.05 KB 23.12 KB NODE_PROD
ReactART-dev.js +0.3% +0.3% 637.62 KB 639.44 KB 135.3 KB 135.67 KB FB_WWW_DEV

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer-shallow.production.min.js 0.0% 🔺+0.1% 12.73 KB 12.73 KB 3.96 KB 3.96 KB UMD_PROD
react-test-renderer.development.js +0.3% +0.3% 605.38 KB 607.03 KB 127.29 KB 127.62 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.2% 🔺+0.2% 76.69 KB 76.82 KB 23.98 KB 24.04 KB UMD_PROD
react-test-renderer.development.js +0.3% +0.2% 576.8 KB 578.37 KB 125.82 KB 126.12 KB NODE_DEV
react-test-renderer.production.min.js 🔺+0.2% 🔺+0.3% 76.51 KB 76.65 KB 23.69 KB 23.75 KB NODE_PROD
ReactTestRenderer-dev.js +0.3% +0.2% 599.62 KB 601.21 KB 128.64 KB 128.92 KB FB_WWW_DEV
ReactTestRenderer-dev.js +0.3% +0.2% 593.23 KB 594.82 KB 128.47 KB 128.76 KB RN_FB_DEV
react-test-renderer-shallow.development.js 0.0% 0.0% 39.16 KB 39.16 KB 9.57 KB 9.57 KB UMD_DEV

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js +0.2% +0.2% 680.45 KB 682.04 KB 147.59 KB 147.9 KB RN_OSS_DEV
ReactNativeRenderer-prod.js 🔺+0.2% 🔺+0.2% 272.16 KB 272.75 KB 48.3 KB 48.42 KB RN_OSS_PROD
ReactNativeRenderer-profiling.js +0.2% +0.2% 283.67 KB 284.22 KB 50.5 KB 50.59 KB RN_OSS_PROFILING
ReactFabric-dev.js +0.2% +0.2% 661.16 KB 662.75 KB 142.92 KB 143.2 KB RN_OSS_DEV
ReactFabric-prod.js 🔺+0.2% 🔺+0.2% 265.87 KB 266.46 KB 47.03 KB 47.13 KB RN_OSS_PROD
ReactFabric-profiling.js +0.2% +0.2% 277.41 KB 277.97 KB 49.24 KB 49.34 KB RN_OSS_PROFILING

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js +0.3% +0.2% 626.63 KB 628.2 KB 134.14 KB 134.43 KB NODE_DEV
react-reconciler-reflection.development.js 0.0% 0.0% 16.69 KB 16.69 KB 4.97 KB 4.98 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.2% 🔺+0.2% 84.19 KB 84.33 KB 25.91 KB 25.96 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% 🔺+0.2% 2.8 KB 2.8 KB 1.15 KB 1.15 KB NODE_PROD

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

Size changes (stable)

Generated by 🚫 dangerJS against 723cfc8

@sizebot
Copy link

sizebot commented Jul 8, 2020

Details of bundled changes.

Comparing: 40cddfe...723cfc8

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.2% +0.2% 908.71 KB 910.51 KB 206.64 KB 206.99 KB NODE_DEV
ReactDOMForked-prod.js 🔺+0.2% 🔺+0.1% 389.96 KB 390.6 KB 72.72 KB 72.82 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% 0.0% 138.35 KB 138.35 KB 36.59 KB 36.59 KB NODE_DEV
react-dom.production.min.js 🔺+0.1% 🔺+0.2% 123.26 KB 123.42 KB 39.53 KB 39.6 KB NODE_PROD
ReactDOMForked-profiling.js +0.2% +0.1% 400.49 KB 401.14 KB 74.47 KB 74.57 KB FB_WWW_PROFILING
react-dom-server.browser.development.js 0.0% 0.0% 144.51 KB 144.51 KB 36.79 KB 36.79 KB UMD_DEV
react-dom-server.node.production.min.js 0.0% 0.0% 20.71 KB 20.71 KB 7.67 KB 7.67 KB NODE_PROD
react-dom-test-utils.production.min.js 0.0% 🔺+0.1% 10.35 KB 10.35 KB 4.07 KB 4.07 KB UMD_PROD
ReactDOMTesting-dev.js +0.2% +0.2% 947.86 KB 949.68 KB 212.53 KB 212.87 KB FB_WWW_DEV
react-dom-test-utils.development.js 0.0% 0.0% 51.15 KB 51.15 KB 14.9 KB 14.9 KB NODE_DEV
ReactDOMTesting-prod.js 🔺+0.2% 🔺+0.1% 395.87 KB 396.5 KB 75.04 KB 75.15 KB FB_WWW_PROD
react-dom-unstable-fizz.node.development.js 0.0% +0.1% 5.61 KB 5.61 KB 1.86 KB 1.86 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% 0.0% 10.2 KB 10.2 KB 3.99 KB 3.99 KB NODE_PROD
react-dom-unstable-fizz.browser.development.js 0.0% -0.1% 5.36 KB 5.36 KB 1.8 KB 1.8 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.2 KB 1.2 KB 703 B 705 B UMD_PROD
react-dom-unstable-fizz.browser.development.js 0.0% +0.1% 4.87 KB 4.87 KB 1.7 KB 1.7 KB NODE_DEV
react-dom.development.js +0.2% +0.2% 954.51 KB 956.4 KB 209.1 KB 209.49 KB UMD_DEV
react-dom-unstable-fizz.browser.production.min.js 0.0% 🔺+0.3% 1.01 KB 1.01 KB 614 B 616 B NODE_PROD
react-dom.production.min.js 🔺+0.1% 🔺+0.2% 123.1 KB 123.26 KB 40.23 KB 40.32 KB UMD_PROD
react-dom.profiling.min.js +0.1% +0.2% 127.05 KB 127.2 KB 41.49 KB 41.56 KB UMD_PROFILING
ReactDOMForked-dev.js +0.2% +0.2% 969.04 KB 970.85 KB 216.64 KB 216.99 KB FB_WWW_DEV
react-dom.profiling.min.js +0.1% +0.1% 127.38 KB 127.53 KB 40.76 KB 40.82 KB NODE_PROFILING
react-dom-server.browser.production.min.js 0.0% 0.0% 20.37 KB 20.37 KB 7.54 KB 7.54 KB UMD_PROD
ReactDOM-dev.js +0.2% +0.2% 982.95 KB 984.77 KB 218.88 KB 219.23 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.2% 🔺+0.1% 394.9 KB 395.55 KB 73.69 KB 73.79 KB FB_WWW_PROD
react-dom-server.browser.development.js 0.0% 0.0% 137.08 KB 137.08 KB 36.34 KB 36.34 KB NODE_DEV
ReactDOM-profiling.js +0.2% +0.1% 405.43 KB 406.08 KB 75.47 KB 75.57 KB FB_WWW_PROFILING
react-dom-server.browser.production.min.js 0.0% 0.0% 20.29 KB 20.29 KB 7.52 KB 7.52 KB NODE_PROD
ReactDOMServer-dev.js 0.0% 0.0% 142.82 KB 142.82 KB 36.33 KB 36.33 KB FB_WWW_DEV
ReactDOMServer-prod.js 0.0% 0.0% 46.7 KB 46.7 KB 10.92 KB 10.92 KB FB_WWW_PROD
react-dom-test-utils.development.js 0.0% 0.0% 55.53 KB 55.53 KB 15.37 KB 15.37 KB UMD_DEV

react-art

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactART-prod.js 🔺+0.3% 🔺+0.2% 245.22 KB 245.85 KB 43.44 KB 43.53 KB FB_WWW_PROD
react-art.development.js +0.3% +0.3% 689.01 KB 690.91 KB 146.07 KB 146.45 KB UMD_DEV
react-art.production.min.js 🔺+0.1% 🔺+0.2% 112.52 KB 112.68 KB 34.82 KB 34.89 KB UMD_PROD
react-art.development.js +0.3% +0.3% 590.49 KB 592.3 KB 128.27 KB 128.63 KB NODE_DEV
react-art.production.min.js 🔺+0.2% 🔺+0.3% 77.42 KB 77.57 KB 23.93 KB 24 KB NODE_PROD
ReactART-dev.js +0.3% +0.3% 627.6 KB 629.42 KB 133.26 KB 133.62 KB FB_WWW_DEV

react-native-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
ReactNativeRenderer-dev.js +0.2% +0.2% 685.34 KB 686.93 KB 148.35 KB 148.66 KB RN_FB_DEV
ReactFabric-dev.js +0.2% +0.2% 666.06 KB 667.65 KB 143.69 KB 143.97 KB RN_FB_DEV
ReactNativeRenderer-dev.js +0.2% +0.2% 680.46 KB 682.05 KB 147.59 KB 147.9 KB RN_OSS_DEV
ReactFabric-prod.js 🔺+0.2% 🔺+0.2% 265.85 KB 266.44 KB 47.02 KB 47.13 KB RN_FB_PROD
ReactNativeRenderer-prod.js 🔺+0.2% 🔺+0.2% 272.17 KB 272.76 KB 48.31 KB 48.42 KB RN_OSS_PROD
ReactFabric-profiling.js +0.2% +0.2% 277.38 KB 277.94 KB 49.23 KB 49.33 KB RN_FB_PROFILING
ReactNativeRenderer-profiling.js +0.2% +0.2% 283.68 KB 284.23 KB 50.51 KB 50.6 KB RN_OSS_PROFILING
ReactNativeRenderer-prod.js 🔺+0.2% 🔺+0.2% 272.13 KB 272.72 KB 48.29 KB 48.41 KB RN_FB_PROD
ReactNativeRenderer-profiling.js +0.2% +0.2% 283.63 KB 284.19 KB 50.49 KB 50.58 KB RN_FB_PROFILING
ReactFabric-dev.js +0.2% +0.2% 661.18 KB 662.77 KB 142.93 KB 143.2 KB RN_OSS_DEV
ReactFabric-prod.js 🔺+0.2% 🔺+0.2% 265.89 KB 266.47 KB 47.03 KB 47.14 KB RN_OSS_PROD
ReactFabric-profiling.js +0.2% +0.2% 277.42 KB 277.98 KB 49.25 KB 49.35 KB RN_OSS_PROFILING

react-test-renderer

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-test-renderer-shallow.production.min.js 0.0% 🔺+0.1% 12.74 KB 12.74 KB 3.97 KB 3.97 KB UMD_PROD
react-test-renderer.development.js +0.3% +0.3% 605.41 KB 607.06 KB 127.3 KB 127.63 KB UMD_DEV
react-test-renderer.production.min.js 🔺+0.2% 🔺+0.2% 76.71 KB 76.85 KB 24 KB 24.05 KB UMD_PROD
react-test-renderer.development.js +0.3% +0.2% 576.82 KB 578.4 KB 125.83 KB 126.13 KB NODE_DEV
react-test-renderer.production.min.js 🔺+0.2% 🔺+0.3% 76.53 KB 76.67 KB 23.7 KB 23.76 KB NODE_PROD
ReactTestRenderer-dev.js +0.3% +0.2% 599.63 KB 601.22 KB 128.64 KB 128.92 KB FB_WWW_DEV
ReactTestRenderer-dev.js +0.3% +0.2% 593.24 KB 594.83 KB 128.48 KB 128.77 KB RN_FB_DEV
react-test-renderer-shallow.development.js 0.0% 0.0% 39.17 KB 39.17 KB 9.58 KB 9.58 KB UMD_DEV

react-reconciler

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-reconciler.development.js +0.3% +0.3% 650.24 KB 652.04 KB 138.64 KB 139 KB NODE_DEV
react-reconciler.production.min.js 🔺+0.2% 🔺+0.2% 87.53 KB 87.69 KB 26.84 KB 26.89 KB NODE_PROD
react-reconciler-reflection.production.min.js 0.0% 🔺+0.2% 2.81 KB 2.81 KB 1.16 KB 1.16 KB NODE_PROD

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

Size changes (experimental)

Generated by 🚫 dangerJS against 723cfc8

@facebook-github-bot facebook-github-bot added CLA Signed React Core Team Opened by a member of the React Core Team labels Jul 8, 2020
// lanes, leading to the extra intermediate render. This is because when
// we schedule the fourth update, we're already in the middle of rendering
// the three others. Since three are only three lanes in the default
// range, the fourth lane is shifted to slightly lower priority. This
Copy link
Member

Choose a reason for hiding this comment

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

the fourth lane is shifted to slightly lower priority

Could you expand in this more? I would think that the "priority" doesn't change, the work just gets pushed out further?

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 "lane priority" of a bit is determined by which range of bits it belongs to. We can't assign a new update to a lane that's already in the middle of rendering. In this (fairly contrived) test scenario, we ran out of lanes in the Default range so we had to pick from the next available lane in a lower priority range. Another option would be to throw out the in-progress work and start over — then we're free to pick any lane we want. tl;dr this is a batching heuristic that doesn't matter that much in most scenarios and probably isn't the last time this will change. It's only observable in tests if you do clever stuff like partial rendering, which we don't officially support and is only used in our own test suite.

Copy link
Member

@rickhanlonii rickhanlonii Jul 10, 2020

Choose a reason for hiding this comment

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

I think what's confusing to me in "the fourth lane is shifted to slightly lower priority" is that the lane isn't what changes priorities? Do you mean "the fourth update is shifted to a (lane in a) slightly lower priority"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh right. Yeah I meant fourth update :D

@@ -3923,7 +3923,6 @@ describe('Profiler', () => {

expect(onPostCommit).toHaveBeenCalledTimes(1);
expect(onPostCommit.mock.calls[0][4]).toMatchInteractions([
initialRenderInteraction,
Copy link
Member

Choose a reason for hiding this comment

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

This is just gone?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tl;dr the initial render is no longer entangled with the Suspense retry. See rationale from previous comment.

@acdlite
Copy link
Collaborator Author

acdlite commented Jul 9, 2020

Note to whoever does this next sync: this is moderately risky. If I weren't possessed of such a daring personality, I might put it behind a feature flag.

@acdlite acdlite merged commit 965d08c into facebook:master Jul 9, 2020
@gaearon gaearon deleted the retry-lane-priority branch July 9, 2020 09:57
@gaearon gaearon restored the retry-lane-priority branch July 9, 2020 09:57
@gaearon gaearon deleted the retry-lane-priority branch July 9, 2020 09:57
@gaearon gaearon restored the retry-lane-priority branch July 9, 2020 09:57
// from its placeholder state to its primary/resolved state.
let lane = findLane(RetryRangeStart, RetryRangeEnd, wipLanes);
if (lane === NoLane) {
lane = pickArbitraryLane(RetryLanes);
Copy link
Contributor

Choose a reason for hiding this comment

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

Late to the party here (sorry, oncall this week and a bit behind) but catching up now, I had a small thought.

The naming of pickArbitraryLane suggests (to me) that it could return a different value each time it's called. Its current implementation always happens to return a predictable/consistent value, but do we think this might ever change? If it did, the usage of it would be at conflict with the above comment:

This should be pure function, so that it always returns the same lane for given inputs.

...in which case maybe calling getLowestPriorityLane directly would be "better"

Copy link
Collaborator Author

@acdlite acdlite Jul 9, 2020

Choose a reason for hiding this comment

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

“arbitrary” in this case means it doesn’t matter if it’s the lowest priority lane or highest priority lane or anything in between.

For example, it communicates if there’s a refactor where the most significant lane is available for some other reason, you could use that instead without affecting the algorithm.

acdlite added a commit to acdlite/react that referenced this pull request Jul 10, 2020
Now that Suspense retries have their own dedicated set of lanes
(facebook#19287), we can determine if a render includes only retries by checking
if its lanes are a subset of the retry lanes.

Previously we inferred this by checking
`workInProgressRootLatestProcessedEventTime`. If it's not set, that
implies that no updates were processed in the current render, which
implies it must be a Suspense retry. The eventual plan is to get rid of
`workInProgressRootLatestProcessedEventTime` and instead track event
times on the root; this change is one the steps toward that goal.

The relevant tests were originally added in facebook#15769.
acdlite added a commit that referenced this pull request Jul 10, 2020
Now that Suspense retries have their own dedicated set of lanes
(#19287), we can determine if a render includes only retries by checking
if its lanes are a subset of the retry lanes.

Previously we inferred this by checking
`workInProgressRootLatestProcessedEventTime`. If it's not set, that
implies that no updates were processed in the current render, which
implies it must be a Suspense retry. The eventual plan is to get rid of
`workInProgressRootLatestProcessedEventTime` and instead track event
times on the root; this change is one the steps toward that goal.

The relevant tests were originally added in #15769.
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.

5 participants