-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
Performance issue when using Swipable in flatlist #1531
Comments
Could you please expand on this one? Preferably with benchmarks and the code you used to show performance issues with Swipeables. |
Basically i apply this on FlatList and when changing on any FlatList item like backgroundcolor or borderColor its slow and taking time but when I remove Swipeable FlatList working fine no issue there. I'll share some code |
I'm seeing poor performance with Swipeable in a Flatlist too. It can be observed by using the swipeable demo from the example in this repo and increasing the number of data items in the Flatlist (There is an older issue here with users reporting the same). For now I've had to switch over to react-native-interactable but I'd much rather be using this library. Relevant packages: |
I'm having this issue too. As soon as I introduce Swipeable in my Flatlist items the list scrolls much less smoothly. I have a couple of 100 items with a thumbnail and av SVG pie chart. The list scrolls perfectly smooth without Swipeable. I thought that maybe the flatlist had trouble measuring the height of Swipeable, so I wrapped it with a View with a constant height. This didn't solve the issue. I tried setting height on containerStyle as well as childrenContainerStyle, no difference. I console.log:ed in the Swipeable source to see if it was re-rendering all the time, but it wasn't. Each Swipeable is rendered twice, but after that no more render is logged while I'm scrolling. I don't know why it renders twice, but this is not the problem anyway. I'll go ahead and try https://github.com/wix/react-native-interactable instead. I'd rather use react-native-gesture-handler since I'm using this lib in other places in my app. It would be really awesome if this issue could be solved somehow. |
To illustrate the problem I have made two screen recordings from my iPhone X. The first recording is with a Swipeable wrapping the list items. When I scroll slowly, the performance problem is very visible. Actually, when looking at this I don't know if this really is a performance problem. It looks more lika some kind of layout problem. The second recording is without Swipeable. Buttery smooth, as you can see. I appologize for the crappy blurring. This is live client data which I cannot show. I have never used iMovie before, so it looks like sh-t. With Swipeable Without Swipeable Edit: |
Hi @msageryd, I am running into same performance issues.... have you solved this anyhow? |
Is there any update about this performance issue? |
We are also facing the same issue. We are using |
Same issue here, any solution or alternative to Swipeable ? |
Same here, I detected this using Shopify's FlashList with Swipeable. When they are together a fast scroll will generate blank areas, while removing Swipeable it works very smooth. Any suggestion or any replacement for Swipeable component? |
Same, are there any alternatives |
I got same issue, any solution for it? |
after i take out swipable the perfomance back to normal, are there any alternatives? |
@crusherblack @ngocle2497 @Acetyld @smfunder @UsamaIkraam0099 |
Did you check performance / fps after implementing this For me it dropped to 30/40fps |
Yes, I'm using FlashList and when i pass undefined to renderLeftActions it works more smoothly but not smooth like without Swipeable, which list you use? |
hey @Acetyld @StasSokolov1 and all the people here. I ended up using Interactable.View. And I use it in combination of FlashList and it is super smooth.
|
This is exciting. Which specific |
@rparrett I'm using "react-native-interactable": "^2.0.1" |
Does it work in expo dev build? |
@Acetyld sorry I don't know, I'm not using expo. |
: ( |
same problem for me! |
Same here |
1 similar comment
Same here |
Guys, I'm not on gesture-handler team, but I would recommend doing following for this issue to get attention of the maintainers:
It would also be most likely beneficial to open a new issue that has above information in the description. |
This issue seems to be describing exactly the same thing as #3141, but that one is newer and has a better description and reproduction so I'll close this one. |
Performance issue when using Swipable in Flatlist
Description
Screenshots
Steps To Reproduce
Expected behavior
Actual behavior
Snack or minimal code example
Package versions
The text was updated successfully, but these errors were encountered: