-
Notifications
You must be signed in to change notification settings - Fork 288
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
Stutter when scrolling #802
Comments
It seems to be happening because each item within the FlashList contains an image. But not sure how to solve the issue. |
Hey @akeva001, can you please provide an example project that demonstrates this issue? we would then try to look into this soon. |
@akeva001 Can you ensure you're using the best values for |
I experienced this issue when using items with varying sizes |
do you by any chance use expo-image? I was using my own caching image implementation and when I gave expo-image a go then I've noticed those stutters too, mostly on Android devices. |
any update on this one? I see cards moving from top to bottom. |
efstathiosntonas I also use expo-image. With normal images and the estimatedSizes recommended by the FlashList everything is OK, but the strange behaviour comes with expo-image's |
@VictorioMolina I rely on cache so setting it to none serves no purpose on my case 🤷♂️ |
any updates on this? i am still facing this issue |
I was able to fix the stuttering by decreasing the resolution of the images in my FlashList! |
FYI: we ran into this at Shortwave. We're pretty sure it's happening because
This is a problem for views with images since, usually, they're height 0 until loaded. This was also a problem for us since we load HTML for threads, which are also size 0 until loaded. We got around it by creating a native module "AnchoredScrollView" that will keep your scroll position anchored even if items above your render window change size. Unfortunately, that means we couldn't use FlashList (we could've forked but there were other problems we ran into). I did publish a gist here. Hopefully, this fix will be adopted by FlashList as well. |
Yeah still appearing indeed when the cachePolicy option is other than “none” if using expo image. Pretty annoying! |
Same here. It defeats most of the purpose of using expo-image. |
Still the case. I have to dump expo-image or flash-list, not ideal |
If you’re encountering this problem due to render window shifts, I’ve published an analysis of the problem and a patch here; feel free to test it out. See if my linked patch works well for you, and if it does, it would be great if you added support for my PR to get thoughts and attention of the maintainers. |
@irisjae I attempted to use your patch, and found that it did fix the stuttering performance when scrolling up. However, I found that if I scrolled very quickly to the top, then the whole view would jump when I reached the top of the view. |
@chrisbianca What OS did you try it on? Could you post a video? You may get better results by tuning the props in the patch. |
i was facing the same issue with expo-image. fixed it by using react-native-fast-image |
i managed to solve the stuttering with expo-image by setting my project displays user avatars in a long Flashlist and I resize the images at upload time already. So there's no need to downscale thumbnail sized images, and the performance improvement is quite noticeable. From the expo image docs about the |
When I scroll through the items in the FlashList, I notice slight stutters. Any help is appreciated. I am rendering posts which contain an image along with a header and footer for each
Platform:
The text was updated successfully, but these errors were encountered: