-
Notifications
You must be signed in to change notification settings - Fork 49.6k
[Fiber] Bail out of diffing wide objects and arrays #34742
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
Merged
eps1lon
merged 1 commit into
main
from
sebbie/10-05-_fiber_bail_out_of_diffing_wide_objects_and_arrays
Oct 5, 2025
Merged
[Fiber] Bail out of diffing wide objects and arrays #34742
eps1lon
merged 1 commit into
main
from
sebbie/10-05-_fiber_bail_out_of_diffing_wide_objects_and_arrays
Oct 5, 2025
+395
−3
Conversation
This file contains hidden or 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
6413af5
to
25ba6e1
Compare
sebmarkbage
approved these changes
Oct 5, 2025
25ba6e1
to
3d4a615
Compare
3d4a615
to
fd3c09d
Compare
github-actions bot
pushed a commit
to code/lib-react
that referenced
this pull request
Oct 6, 2025
DiffTrain build for [1be3ce9](facebook@1be3ce9)
github-actions bot
pushed a commit
to code/lib-react
that referenced
this pull request
Oct 6, 2025
DiffTrain build for [1be3ce9](facebook@1be3ce9)
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.
Fixes #34693
When we commit in development, React will diff objects to check if they might be referentially equal and add a hint that the object should be memoized. If they're unequal, React will show a diff.
However, we attempted to diff the full object which can be problematic for wide objects or, like in the original report, large Arrays.
With this we just bail out after 100 properties. Ideally, we'd have different counters for how many properties we check and how many diffed properties we print. Checking 10k properties would make sense. Adding a diff for 10k properties does not.
Test plan