-
Notifications
You must be signed in to change notification settings - Fork 463
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
Animated element freeze the app when it out off-screen #2837
Comments
@bayazetyan I think I have a similar issue |
My package versions. "@shopify/react-native-skia": "1.5.0", For more context, I recently upgraded to the new react native architecture but not sure its the reason. I think this was already happening. And I have a scrollView inside a tabview that has some animated widgets and background. When commenting those widgets, the scroll view seems smooth, when uncommenting and as soon as they are out of the screen, same as @bayazetyan the UI frames go to ~5-10fps and the UI seems to freeze until I scroll the animated components back. @wcandillon Maybe we are doing something very wrong by putting skia canvas in scrollviews or there is something else, but this seems like a real bug. Any help would be great, as I love skia and rely heavily on it for all the animations. |
I upgraded to the latest skia version (1.8.0) but still experiencing the same issue. |
@adriangonzy This happens when the animated element is inside a Scroll View. If the element is inside a View but extends beyond the screen, there are no fps issues. |
I tested on a real device and not the simulator and did not have any issue in the end. It seems to be only a problem on the simulator. In my case, I need to have my components in a scrollview. |
Same things on real device all work correct. If there are no other comments, I will close this issue soon. |
Description
The provided example demonstrates how animations can impact the UI thread. When the animated element moves off-screen, the application experiences a significant slowdown. This issue is particularly noticeable when the animated element is inside a
ScrollView
. However, when the element is visible within the viewport, everything works smoothly.Initially, I suspected that the problem was due to the animation being inside a
ScrollView
. However, after testing, I observed the same slowdown occurring even when the animated element is placed off-screen outside of aScrollView
."react-native-reanimated": "^3.16.1",
"@shopify/react-native-skia": "^1.5.3",
"react-native": "0.76.1",
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-12-26.at.16.27.01.mp4
The text was updated successfully, but these errors were encountered: