-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Inverted SectionList/Flatlist/Flashlist has frame drop #35983
Comments
@devoren Hi! Sorry for the English... let's go! Use the "initialNumToRender" property to render only the first items in the list, while the other items are rendered as the user scrolls. This can help reduce the number of initially rendered elements and therefore improve performance. |
@cl3i550n Thanks for the quick response! I used these props to improve performance, but it didn't help much. As you said about 3rd party libraries, I'm trying to use flashlist but it also has lags but their documentation says to measure in release mod but don't think there will be big changes. So I tried scaleY: -1 instead of inverted prop but no change. I'm going to try react-native-large-list, if it helps I'll let you know |
It's worked
|
@decisionnguyen I don't know why, but it doesn't work for me, if I add this condition, then the inverted prop doesn't work at all :( |
@cl3i550n It doesn't matter which list I use, the UI drops at 30fps, maybe the problem is with react native and not the list? |
try other device... or change react native version, try disabling hermes... I can't reproduce the problem, for me it works normal without frame drop. Try using your cell phone as an emulator, for a real simulation of the app... |
@cl3i550n What version of RN are you using? |
0.71.1 |
@cl3i550n I use a flash list on native stack screen, maybe because of that? |
Use the FlatList's Use the FlatList's Use the FlatList's Use the FlatList's Use the FlatList's Use the FlatList's Use the FlatList's Use the Here's an example of how you can reverse the order of items in your FlatList without using the
Instead of using the Sorry bad english! |
@cl3i550n Thanks for the advice!!! I need inverted prop to invert scroll position, I will try all suggestions |
After a lot of reading and experimenting, |
@IshmamR Thank you, i will try |
Worked! But the scrollbar went to the left. |
possible duplicate of #35350 |
Description
I want to use a flatlist or flashlist to show a inverted list. But if I use inverted prop on android it works very slow.
Default Flatlist: drops 5-10 FPS in dev mode (UI 60FPS)
Inverted Flatlist: drops 30-40 FPS in dev mode (UI also 20-40FPS)
Default:
default.webm
Inverted:
inverted.webm
Version
0.71.1
Output of
npx react-native info
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
Memory: 3.17 GB / 15.84 GB
Binaries:
Node: 18.12.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 9.2.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: AI-221.6008.13.2211.9477386
Visual Studio: 16.11.31624.102 (Visual Studio Enterprise�2019)
Languages:
Java: 11.0.13 - /c/Program Files/Common Files/Oracle/Java/javapath/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.1 => 0.71.1
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: