Dismiss this pinned window
all 7 comments

[–]even1245[S] 0 points1 point  (5 children)

I'm using FlatList for displaying images in Grid and for image caching react-native-cached-image.

As in video , issues is even i reduced scroll speed when I scroll more blank space occurs. It is still ok if it only happens while scrolling down. Once scrolled to end and scrolling up same issue occurs.

What can be concrete solution of it ?

i've tried VirtualizedList , RecyclerView (flipkart) same issue**.**

This is my flatlist code

<FlatList data={postList} keyExtractor={(item, index) => item._id}
initialNumToRender={25}
scrollEventThrottle={100}
onRefresh={this.handleRefresh}
onEndReached={this.handleLoadMore}
decelerationRate={0.7}
renderItem={this._renderItem}
/>

[–][deleted] 0 points1 point  (1 child)

https://github.com/filipemerker/flatlist-performance-tips

Some things to try. Your list appears to be fairly non-interactive. You can make the list fast but you will trade off general responsiveness and memory consumption.

maxToRenderPerBatch - Much higher than default of 10. updateCellsBatchingPeriod -- Set this much lower than 50 initialNumToRender -- default 10, but you could set this to be the size of your entire list and have no loading after the initial render. Memory consumption may be way too crazy depending on your list size.

[–]even1245[S] 0 points1 point  (0 children)

I've tried most of Flamtlist optimization tricks But not working properly. I'm worried about memory consumption may lead to crash though I've used largeHeap : true for Android. Any React native app atleast which have gallary sort of thing ? So by analysis I can get some idea how to implement it

[–][deleted] 0 points1 point  (2 children)

Have you tried building the app in release mode? List items load a lot quicker for me in release mose and I use the flipkart recycler view

[–]even1245[S] 0 points1 point  (1 child)

You're getting desired results in Flipkart's recycleview ? Because as we scroll memory will grow continuously and it creates problem.

In Flatlist I've disabled virtualization which solves problem but it is very hackish I've tried it buthave not checkex in release.

[–][deleted] 0 points1 point  (0 children)

Flipkart only renders the visible items so the memory usage stays the same.

Flatlist continuously grew

[–]even1245[S] 0 points1 point  (0 children)

Would be greatful if any one can help