georstat/react-native-image-cache

Slow performance

Opened this issue · 2 comments

Used react-native-image-cache ^3.1.0. These are the milliseconds it takes to read from the cache for 6 profile pictures, each around 50KB:

LOG onLoad 298
LOG onLoad 304
LOG onLoad 328
LOG onLoad 318
LOG onLoad 320
LOG onLoad 314
Average 313ms

And here are the same 6 profile pictures using the default Image once they are loaded:

LOG onLoad 187
LOG onLoad 174
LOG onLoad 162
LOG onLoad 151
LOG onLoad 138
LOG onLoad 129
Average 156.83ms

Additionally, there is some time until the default loading animation is replaced with the image, making the whole experience feel slow. I initially thought caching didn't work at all and spent more than an hour debugging. It feels 3-4 times slower than using the default Image once the source is loaded.

Hi @Stas-Buzunko, sorry for the late reply, it’s been a tough month. Have you tried decreasking the animation duration? Slowness is kinda normal since we load 2 image components, both animated, one for thumb and one for the actual image.

Tomorrow I’ll create a new version that totally removes the thumbnail image component from the render tree as it stays there behind the actual image (not a bug but bad flow since it consumes resources and it’s not visible).

Hey great lib, any news about the new version?