FSPinho / react-native-speedy-list

A performance focused list component for React Native.
MIT License
23 stars 2 forks source link

Dynamic heights #4

Open LouisSyfer opened 2 years ago

LouisSyfer commented 2 years ago

Hi Felipe,

Congratulations for your speedy list. It works better than others like "big list" for example. I tried it with fixed height item and the performances were there ! But... I meet the same problem as for project like "big list". When I try too adapt it to a flatlist with different heights (photos, videos, etc.) the result is horrible. In fact, I don't understand the logic. Please which datas can I merely define to use it with dynamic heights ? I can't adapt the example you show on Medium with my own properties.

Thanks in advance for the reply.

FSPinho commented 2 years ago

Hi @LouisSyfer. Thanks for your comment.

The performance relies on the recycling of the elements. Then, if each of them is rendering complex trees or executing heavy operations, imagine that it will be multiplied hundreds of times while scrolling. If you can provide a minimal code example, or even better, a working repository, then we could analyze it for your specific case. In the meanwhile, I'd recommend you to play with the values of initialBatchSizeand recyclableItemsCount to improve the performance.

Cheers, Felipe

LouisSyfer commented 2 years ago

Hi Felipe,

Ok I see...

Thanks for the answer !

Regards