Introduce getDiffProps for <View> (#45552)#64
Merged
1 commit merged into0.78.0-discordfrom May 14, 2025
Merged
Conversation
Summary: Pull Request resolved: facebook#45552 In this diff I'm overriding the getDiffProps for ViewProps. The goal is to verify what's the impact of calculating diffs of props in Android, starting with ViewProps. Once we verify what are the implication we will automatic implement this diffing. The full implementation of this method will be implemented in the following diffs changelog: [internal] internal Reviewed By: NickGerleman Differential Revision: D59969328 fbshipit-source-id: ce141528581e46e9ced4175dca040ddf8bed5ddb
|
It's related to PR #61, which enables the feature flag (only on the new arch). |
bdbaraban
pushed a commit
that referenced
this pull request
May 22, 2025
Summary: Pull Request resolved: facebook#45552 In this diff I'm overriding the getDiffProps for ViewProps. The goal is to verify what's the impact of calculating diffs of props in Android, starting with ViewProps. Once we verify what are the implication we will automatic implement this diffing. The full implementation of this method will be implemented in the following diffs changelog: [internal] internal Reviewed By: NickGerleman Differential Revision: D59969328 fbshipit-source-id: ce141528581e46e9ced4175dca040ddf8bed5ddb Co-authored-by: David Vacca <dvacca@meta.com>
This pull request was closed.
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
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.
TL;DR
This cherry-picks this PR on top of our RN 0.78 branch to fix some rendering issues happening on new arch:
Details
When using FlashList with new arch on our RN 0.78 build we were seeing weird layout bugs:
after testing we found that on RN 0.79 these issues don't happen. I ran a bisect and found that this commit fixes the issue.
Weird details
Now, its odd that this commit is fixing the issue, as the function
getDiffPropsis nowhere called during runtime! (There is one call site inandroid/FabricMountingManager.cppbut thats behind a feature flag that is false).My best assumption is that in release mode (the only place where the bug happens) some optimization flags are applied which cause some corruption (messing with the vtable as this is a virtual function?). In debug those flags aren't applied and so the bug doesn't happen.