Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

296
Views
React Native API Request slow on production but fast on development

I'm having a huge problem where my requests take long on the production server but are quick on the development server.

I'm using apisauce to make my requests.

Slow request example: The login screen uses a simple username and password with redux to store the logged-in user data. This can take up to 30 seconds but on development, it takes about 2 secs.

One of the improvements I made was setting the headers only once instead of on all the requests which were not clever but are better now. There was only a slight speed improvement but not enough. I was also using the AsyncStorage to store the user data but that is now changed to redux, again a slight improvement but not enough.

I did try and debug with react native debugger but it wouldn't connect so I did it manually with timing the requests.

Does anyone know why the requests are slower and how to fix them?

So I've done some more testing and found that the posting of an image was one of the causes to the slow request speed, not sure why it's only on the live server.

I also found on the first login when I ran the network inspection, the Waiting (TTFB) took about 18seconds then after that it's fine. I'm not sure why that is though. enter image description here

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!