Skip to content

[Android] Fetch takes so much time to call simple api #31539

@pqminh

Description

@pqminh

Description

Fetch takes so much time to call simple api. Over 60s

Screen Shot 2021-05-17 at 23 24 25

Screen Shot 2021-05-17 at 23 22 43

React Native version:

react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
Android 10 (debug & release mode)

Steps To Reproduce

let startTime = new Date();
console.log('startTime', startTime.toLocaleString());
fetch('https://reactnative.dev/movies.json')
.then(response => response.json())
.then(json => {
let endTime = new Date();
console.log('endTime', endTime.toLocaleString());
console.log('duration', endTime - startTime);
return json.movies;
})
.catch(error => {
console.error(error);
});

I also try to use axios, xhr but still got this issue. Please help!
repo: https://github.com/pqminh/android-takes-much-time-to-call-api

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions