Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow performance #74

Open
Stas-Buzunko opened this issue Jan 11, 2024 · 2 comments
Open

Slow performance #74

Stas-Buzunko opened this issue Jan 11, 2024 · 2 comments

Comments

@Stas-Buzunko
Copy link

Stas-Buzunko commented Jan 11, 2024

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.

@efstathiosntonas
Copy link
Member

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).

@francois-pasquier
Copy link

Hey great lib, any news about the new version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants