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

Switch to withSpring to work around Reanimated regression #4391

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Jun 6, 2024

When we switched from Reanimated 3.6 to 3.11, scrolling on Home has gotten incredibly choppy. @haileyok and I narrowed it down to this animated value — it's being set to both plain numbers and to withTiming, and for some reason it appears that doing both (or maybe even just withTiming by itself) makes it choppy even after the animation has completed (i.e. while scrolling later). It seems like withSpring doesn't have this problem so this just switches us to do that.

I've looked at other places where we have withTiming and they don't seem negatively affected so I didn't touch it.

Test Plan

Scroll Home feed on low-end Android. It was super choppy before, now it's okay (with some dropped frames).

Copy link

render bot commented Jun 6, 2024

Copy link

github-actions bot commented Jun 6, 2024

Old size New size Diff
7.39 MB 7.39 MB -82 B (-0.00%)

Copy link
Member

@mozzius mozzius left a comment

Choose a reason for hiding this comment

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

I wasn't able to reproduce the original bug to confirm it fixed it, but this change looks pretty safe and works the same on my sim

@gaearon gaearon merged commit 4879644 into main Jun 6, 2024
6 checks passed
@gaearon gaearon deleted the fix-animation-hell branch June 6, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants