Skip to content

fix: check prop changes on the native side#40

Open
WoLewicki wants to merge 1 commit into
3.19.4-discordfrom
wolewicki/other-approach
Open

fix: check prop changes on the native side#40
WoLewicki wants to merge 1 commit into
3.19.4-discordfrom
wolewicki/other-approach

Conversation

@WoLewicki

Copy link
Copy Markdown

Summary

PropsRegistry::update() currently always refreshes timestampMap_[tag] and replaces the stored merged props, even when the incoming write would produce a folly::dynamic that's byte-equal to what's already stored. Combined with getUpdatesOlderThanTimestamp()'s 1s-stale-but-not-yet-2s-old delivery window, every redundant write reaches React via setState({settledProps: …}) on the corresponding AnimatedComponent ~1.0–1.5s later.

This PR adds an early return in update(): if the merged props equal the existing entry, skip both the move AND the timestamp refresh. The existing entry is already in the registry; nothing about it has changed; it should not be re-delivered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant