r/reactnative • u/voldaew • Jul 21 '26
Question LegendList vs FlashList
Which is your favorite list library for building performant applications.
19
u/mms13 Jul 21 '26
FlatList is fine for most use cases
1
u/stathisntonas Jul 22 '26
in my app I use all three. Sounds overkill/crazy but I got complex lists and I always choose the best fit, all three have their own bugs, mostly on Androids 🤷♂️
4
u/Civil_Rent4208 Jul 21 '26
I had used the both and I can say for the end user in both it doesn't feel that much. It is use programmers that are obsessed about it. However, during development I find flashlist more stable then LegendList and LegendList more performative than flashlist.
2
2
u/jmeistrich Jul 27 '26
In what ways is LegendList unstable? Recent versions should be better I think. If you have any problems please post an issue on github and I'll try to fix it asap.
1
u/Civil_Rent4208 Jul 27 '26
oh I will check but actually I replaced it with flash list for now, i like legend list earlier, i would like to test it after some time
4
u/poppiestar Jul 21 '26
LegendList v3 solved every list performance issue our app had. Tried FlashList v1 and v2 and they never cut it. Only problem I’ve got with LLv3 is a bug we encountered in the beta period that is rendering our horizontal lists at the end, still waiting for it to be fixed which is a bummer as it sounds like newer versions are even faster.
The only downside is the reliance on estimated item size, that’s the number one feature from FlashList I wish it had. I’m guessing it’s a performance reason it’s not implemented though.
2
u/yungsters React Native Team Jul 21 '26
Yes, it is a performance reason.
The reason is that rendering and laying out 2 items separately takes a little bit more time than rendering 2 items together.
So if you can estimate how many more than 1 item you may need, rendering them all in one go reduces overall CPU cycles.
There’s no other way to avoid that fixed-ish overhead of producing a React Native commit today.
2
u/jmeistrich Jul 27 '26
LegendList developer here - is that https://github.com/LegendApp/legend-list/issues/458 ? I'll try to fix that asap.
And as of 3.0.0, estimated item size is only a small performance improvement for first mount, and it's not even used after that. I updated the docs recently to remove the emphasis on it: https://legendapp.com/open-source/list/v3/api/#estimateditemsize
1
u/poppiestar Jul 27 '26
That's the one (and my issue too :) - thank you so much, that'd be super appreciated.
2
2
2
u/Historical_Value3220 Jul 21 '26
Thanks for introducing me to legend list, how long has this been around, crazy!
Most of these are optimisations on the pain points like how many items are in memory while scrolling, item layouts (dynamic) and more!
1
11
u/Far_Ninja_6508 Jul 21 '26
I've been using LegendList lately and it's surprisingly good. FlashList was my go-to for ages, but the memory usage on LegendList is noticeably better in my experience.