DylanVann / react-native-fast-image

🚩 FastImage, performant React Native image component.
MIT License
8.22k stars 1.51k forks source link

Is this also useful for local images? #469

Open cristianoccazinsp opened 5 years ago

cristianoccazinsp commented 5 years ago

Just wondering, does this provide any significant performance boost when loading images from a local source? Trying to build a gallery viewer, but react is just way too slow to render images with takes ~1 second to load just 10-15 images in a FlatList.

DylanVann commented 5 years ago

I don’t think it would make much of a difference if you use this vs. Image for local images.

What you need to do is make sure you’re loading thumbnails of the right size, if you’re trying to render a grid using the original photos that will probably be super slow and use a lot of memory.

cristianoccazinsp commented 5 years ago

That's interesting. Testing with full images it doesn't really seem like React's Image loads it all into memory, I would otherwise be getting lots of out of memory errors. Are you sure there's really any difference between loading the full image vs loading a reduced one?