-
Notifications
You must be signed in to change notification settings - Fork 47.7k
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
Fix Suspense throttling mechanism #26802
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Comparing: 4cd7065...3dd8d5a Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
The throttling mechanism for fallbacks should apply to both their appearance _and_ disappearance. This was mostly addressed by facebook#26611. See that PR for additional context. However, a flaw in the implementation is that we only update the the timestamp used for throttling when the fallback initially appears. We don't update it when the real content pops in. If lots of content in separate Suspense trees loads around the same time, you can still get jank. The issue is fixed by updating the throttling timestamp whenever the visibility of a fallback changes. Not just when it appears.
e1c2b5d
to
3dd8d5a
Compare
github-actions bot
pushed a commit
that referenced
this pull request
May 16, 2023
The throttling mechanism for fallbacks should apply to both their appearance _and_ disappearance. This was mostly addressed by #26611. See that PR for additional context. However, a flaw in the implementation is that we only update the the timestamp used for throttling when the fallback initially appears. We don't update it when the real content pops in. If lots of content in separate Suspense trees loads around the same time, you can still get jank. The issue is fixed by updating the throttling timestamp whenever the visibility of a fallback changes. Not just when it appears. DiffTrain build for [4bfcd02](4bfcd02)
yungsters
added a commit
that referenced
this pull request
Mar 18, 2024
## Summary Creates a new `alwaysThrottleDisappearingFallbacks` feature flag that gates the changes from #26802 (instead of being controlled by `alwaysThrottleRetries`). The values of this new flag mirror the current values of `alwaysThrottleRetries` such that there is no behavior difference. This additional feature flag allows us to incrementally validate the change (arguably bug fix) from #26802 independently from `alwaysThrottleRetries`. ## How did you test this change? ``` $ yarn test $ yarn flow dom-browser $ yarn flow dom-fb $ yarn flow fabric ```
github-actions bot
pushed a commit
that referenced
this pull request
Mar 18, 2024
## Summary Creates a new `alwaysThrottleDisappearingFallbacks` feature flag that gates the changes from #26802 (instead of being controlled by `alwaysThrottleRetries`). The values of this new flag mirror the current values of `alwaysThrottleRetries` such that there is no behavior difference. This additional feature flag allows us to incrementally validate the change (arguably bug fix) from #26802 independently from `alwaysThrottleRetries`. ## How did you test this change? ``` $ yarn test $ yarn flow dom-browser $ yarn flow dom-fb $ yarn flow fabric ``` DiffTrain build for [0aab065](0aab065)
EdisonVan
pushed a commit
to EdisonVan/react
that referenced
this pull request
Apr 15, 2024
The throttling mechanism for fallbacks should apply to both their appearance _and_ disappearance. This was mostly addressed by facebook#26611. See that PR for additional context. However, a flaw in the implementation is that we only update the the timestamp used for throttling when the fallback initially appears. We don't update it when the real content pops in. If lots of content in separate Suspense trees loads around the same time, you can still get jank. The issue is fixed by updating the throttling timestamp whenever the visibility of a fallback changes. Not just when it appears.
EdisonVan
pushed a commit
to EdisonVan/react
that referenced
this pull request
Apr 15, 2024
## Summary Creates a new `alwaysThrottleDisappearingFallbacks` feature flag that gates the changes from facebook#26802 (instead of being controlled by `alwaysThrottleRetries`). The values of this new flag mirror the current values of `alwaysThrottleRetries` such that there is no behavior difference. This additional feature flag allows us to incrementally validate the change (arguably bug fix) from facebook#26802 independently from `alwaysThrottleRetries`. ## How did you test this change? ``` $ yarn test $ yarn flow dom-browser $ yarn flow dom-fb $ yarn flow fabric ```
bigfootjon
pushed a commit
that referenced
this pull request
Apr 18, 2024
The throttling mechanism for fallbacks should apply to both their appearance _and_ disappearance. This was mostly addressed by #26611. See that PR for additional context. However, a flaw in the implementation is that we only update the the timestamp used for throttling when the fallback initially appears. We don't update it when the real content pops in. If lots of content in separate Suspense trees loads around the same time, you can still get jank. The issue is fixed by updating the throttling timestamp whenever the visibility of a fallback changes. Not just when it appears. DiffTrain build for commit 4bfcd02.
Akshato07
pushed a commit
to Akshato07/-Luffy
that referenced
this pull request
Feb 20, 2025
## Summary Creates a new `alwaysThrottleDisappearingFallbacks` feature flag that gates the changes from facebook/react#26802 (instead of being controlled by `alwaysThrottleRetries`). The values of this new flag mirror the current values of `alwaysThrottleRetries` such that there is no behavior difference. This additional feature flag allows us to incrementally validate the change (arguably bug fix) from facebook/react#26802 independently from `alwaysThrottleRetries`. ## How did you test this change? ``` $ yarn test $ yarn flow dom-browser $ yarn flow dom-fb $ yarn flow fabric ``` DiffTrain build for commit facebook/react@0aab065.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The throttling mechanism for fallbacks should apply to both their appearance and disappearance.
This was mostly addressed by #26611. See that PR for additional context.
However, a flaw in the implementation is that we only update the the timestamp used for throttling when the fallback initially appears. We don't update it when the real content pops in. If lots of content in separate Suspense trees loads around the same time, you can still get jank.
The issue is fixed by updating the throttling timestamp whenever the visibility of a fallback changes. Not just when it appears.