React-Query staleTime set to 0 increase the time to load our Home page

Viewed 388

In our iOS react-native@0.66.3 application that use react-query@3.34.16,

We are experiencing latency to load our home page after we reduced the staleTime to 0 globally for react-query

This is the commit that added the latency :

https://github.com/pass-culture/pass-culture-app-native/commit/1c8ea9b0bb4ff40206d606ea150e1853d01b4d0c

before

https://user-images.githubusercontent.com/77674046/156797772-d0f81bf3-fcfe-4d1f-945e-a4a4f377747f.MP4

after

https://user-images.githubusercontent.com/77674046/156797911-be409b24-ef64-4a75-b9e6-b853b64c3d1f.MP4

Using our older version on Test flight, we can see that before this commit, the home page takes 3secs to load, now it takes 10secs.

We cannot revert the commit because it's required for our offline mode

We don't get why it is not that slow on Android, can anyone help us understand what is going on?

0 Answers
Related