Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

298
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda