I have a problem with my APIs. When I run them in Dev or with postman they take a maximum of 0.25sec. But as soon as I build the app or run it on a tablet with the Expo app, an API can take up to 10min and it’s not because of the wifi or the tablet, I’ve tried several. Does anyone have any idea what this could be?
Example of an API:
const getEmployee = async (): Promise<Array> => {
const token = await getData(localStoreKeys.token, false);
Due to multiple refreshes and continuous bundling, expo gets slow (as per me) thus disabling this feature may help (infact helped me a lot). STEPS TO DO THAT; In your expo go app, shake your device. An option panel will open.
Thank you very much for your answer. Unfortunately, when I build the app, the API becomes extremely slow. But I don’t understand why. I have installed it on several devices and it is the same everywhere. Also in other wifis. But on the emulator it works fine…
The problem is because I had not set up IPv6 on the server. Apparently, some devices want IPv6 and if they don’t have it. They have a problem with DNS. This slows down the API call significantly.
Yes, as I mentioned, the problem is that there was no IPv6 set up on the server. And the DNS settings regarding IP46 were wrong. The tablet had a problem with this and the first query took a long time.