react-native-gifted-chat
react-native-gifted-chat copied to clipboard
Scrolling through chat becomes slow when a long text message is send
Issue Description
Scrolling through chat becomes slow when a long text message is send
Steps to Reproduce / Code Snippets
Try by sending large amount of text message and scrolling through chat becomes slower
Expected Results
Need smooth scroll when long text message is send
Additional Information
- Nodejs version: [v16.5.0]
- React version: [17.0.1]
- React Native version: [0.64.2]
- react-native-gifted-chat version: [0.16.3]
- Platform(s) (iOS, Android, or both?): [both]
- TypeScript version: [FILL THIS OUT]
+1 Android 12
It works for me. https://github.com/facebook/react-native/issues/30034#issuecomment-806396274
@hama0511 use recyclerlistview
Sorry, but this issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. BTW Thank you for your contributions 😀 !!!
Can you cause this plugin to use react-native-android-recyclerview? Beats flatlist and recyclerlistview on android any day. Chats on androids take a noticeable hit when the text bubbles are long / when there are over like 10 one-lined messages. None of the fixes recommended in the other issues worked (like ScaleY).
Add shouldRasterizeIOS and renderToHardwareTextureAndroid
<View shouldRasterizeIOS renderToHardwareTextureAndroid> <Bubble {...props}/> </View>
https://reactnative.dev/docs/performance#moving-a-view-on-the-screen-scrolling-translating-rotating-drops-ui-thread-fps
It became an issue for Android 12 & 13 versions on RN 0.70, specifically for inverted lists.
This comment contains a fix you can apply to React Native VirtualizedList directly. Just use patch-package to create a patch file with the changes needed.
https://github.com/facebook/react-native/issues/30034#issuecomment-1374355184
Add shouldRasterizeIOS and renderToHardwareTextureAndroid
<View shouldRasterizeIOS renderToHardwareTextureAndroid> <Bubble {...props}/> </View>https://reactnative.dev/docs/performance#moving-a-view-on-the-screen-scrolling-translating-rotating-drops-ui-thread-fps
This really helped me you saved my ass :D