You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a Rive component inside a ScrollView, scrolling performance significantly degrades once the animation moves outside the viewport. If you initiate a scroll while the animation is off-screen, the main thread appears to freeze for approximately one second. This leads to dropped frames and a temporarily unresponsive app.
During testing, I discovered that this issue occurs only in the iOS simulator. While this provides a potential workaround for real devices, the problem is still present in the simulator, and I wanted to document it properly. Since I’ve already created a reproduction project, I figured it would be useful to report the issue.
Provide a Repro
import{StyleSheet,Text,ScrollView}from"react-native";importRivefrom"rive-react-native";exportdefaultfunctionHomeScreen(){consttextsArray=Array.from({length: 300},(_,index)=>index+1);return(<ScrollViewstyle={styles.container}contentContainerStyle={styles.content}contentInsetAdjustmentBehavior="automatic"><RiveresourceName="flying_car"style={{width: 400,height: 400}}/>{textsArray.map((item)=>(<Textkey={item}>This is text {item}</Text>))}</ScrollView>);}conststyles=StyleSheet.create({container: {flex: 1,},content: {backgroundColor: "orange",},});
In the example I used a community file, but I've tested with multiple .riv files both embedded in the app and via CDN. The issue appears in all situations.
Expected behavior
Scrolling performance should remain smooth, both when the animation is visible and when it has scrolled out of view.
Description
When using a
Rive
component inside aScrollView
, scrolling performance significantly degrades once the animation moves outside the viewport. If you initiate a scroll while the animation is off-screen, the main thread appears to freeze for approximately one second. This leads to dropped frames and a temporarily unresponsive app.During testing, I discovered that this issue occurs only in the iOS simulator. While this provides a potential workaround for real devices, the problem is still present in the simulator, and I wanted to document it properly. Since I’ve already created a reproduction project, I figured it would be useful to report the issue.
Provide a Repro
I've also made a demo project: https://github.com/BakkerTom/rive-bug-demo
Source
.riv
/.rev
fileIn the example I used a community file, but I've tested with multiple .riv files both embedded in the app and via CDN. The issue appears in all situations.
Expected behavior
Scrolling performance should remain smooth, both when the animation is visible and when it has scrolled out of view.
Screenshots
RocketSim_Recording_iPhone_16_6.1_2025-02-26_14.10.52.mp4
Device & Versions (please complete the following information)
Additional context
I recorded a trace using Instruments while scrolling through the interface:
Rive Bug Trace.trace.zip
The text was updated successfully, but these errors were encountered: