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

In our iOS [email protected] application that use [email protected],

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?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source