-
Notifications
You must be signed in to change notification settings - Fork 22
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
Low performance with a SpatialNavigationVirtualisedList and lots of data #138
Comments
Hey! Thank you for the issue. Can you provide more details? What are you trying to achieve visually? Isn't it a grid? |
Hi, I cannot use the grid, it is a page made up of many horizontal list, there are 3-4 types of horizontal list that are rendered, with a height dimension of about 400 px, could I get around this problem by dividing the elements into several pieces and then render them using several different lists? |
Okay so, is it an infinite vertical list of lists ? If I understood correctly, then we're not handling this case yet. Usually, our use case with such lists is that they're not infinite and in an acceptable amount so that we can put them in a vertical SpatialNavigationScrollView. |
But the thing is that you made it work, so I might be wrong. In any case, you should know that virtualizing whole lists will perform poorly, because on each scroll you need to unmount a whole list and mount a whole new list (even though it is virtualized, it's still like... 20 elements to mount/unmount at once!) I have no idea on how to approach this problem. Recycling elements is helpful (which our list kind of does -- I don't know about recycling whole lists though), but I don't think it is enough, especially if your lists are not similar enough. |
How much would be an acceptable quantity? |
Have you tried not virtualizing vertically? It will make the initial rendering longer, but at least it should be smoother afterwards! |
If I do not virtualise the list, I have to implement the scroll logic of the flatlist, right? |
Mmmmh I'm not sure I understand what you mean haha My point was :
But I'm not sure of what I understood of your layout. |
Exactly, now I am trying to be clearer, I currently use a virtualised vertical list to render elements. These elements can be of 4 types: Horizontal virtualised list, with a size of 400 The total number of elements may vary, between a minimum of 30 and a maximum of 50 |
In addition, it has happened to me a few times that when scrolling through the vertical pricnipal list, after 5-6 items have been scrolled through, they are completely hidden and there is no way to return to seeing them |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Expected behavior
The list is lazy loading and maintains high performance correctly.
Actually behavior
The list is loaded all at once without any lazy loading logic being applied
Version and OS
Additional context
Use a data set of at least 40 elements, as render items we need to use other SpatialNavigationVirtualisedLists, so we have a SpatialNavigationVirtualisedList that renders other SpatialNavigationVirtualisedLists
All render item have differnt height size
The text was updated successfully, but these errors were encountered: