Bad Android Scrolling Performance
See original GitHub issueDescribe the bug When we have a high amount of images displayed in a ScrollVIew or FlatList, scrolling does not really work when we use FastImage on Android. The same code works very well on iOS Devices.
To Reproduce I tested this example code in a plain react-native app and the same behavior was recognized:
import { FlatList, View, ScrollView } from 'react-native'
import FastImage from 'react-native-fast-image'
const data = Array(100).fill(1)
const App = () => {
return (
<View style={{ flex: 1 }}>
<ScrollView style={{ backgroundColor: '#000' }}>
{data.map((element, index) => {
return (
<FastImage
onError={() => console.log('error', index)}
source={{ uri: `https://picsum.photos/id/${index}/450/253` }}
style={{ width: '100%', aspectRatio: 16 / 9 }}
/>
)
})}
</ScrollView>
</View>
)
}
Expected behavior Smooth scrolling also on android devices
Dependency versions
- React Native version: 0.61.4
- React version: 16.11.0
- React Native Fast Image version: 7.0.2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:8
Top Results From Across the Web
Android RecyclerView Scrolling Performance - Stack Overflow
The problem is the poor scrolling performance. This in a RecycleView with only 8 items. In some tests I verified that in Android...
Read more >How to fix Android Phone scrolling problem-Carlcare
Here are the simple solutions to fix Android phone scrolling problem by yourself! You can try to update system, turn off developer options ......
Read more >Android faces a performance crisis that only Google can fix
According to Poole, “The vast majority of people's time on a phone is scrolling through webpages, scrolling through Facebook, or something like ...
Read more >Really bad scrolling/UI lag after Android 12 update - Reddit
TO TRY THIS, GO TO AN APP KNOWN TO HAVE BAD STUTTERING, USING BOTH HANDS, KEEP ONE FINGER ON THE SCREEN AT ALL...
Read more >How to Improve RecyclerView Scrolling Performance in ...
How to Improve RecyclerView Scrolling Performance in Android? · 1. Set a specific width and height to ImageView in RecyclerView items · 2....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@klaaz0r , did u made it working with scrollView? UPDATE: made it working using
removeClippedSubviews={true}
for ScrollViewSame here RN@0.61.5 Many horizontal Flatlists and on Android it sluggish and feels slow. On iOS, it works fine.