itinance / itinance/react-native-fs

screen freezes on Android when reading file

Open
#957 3 comments 8 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

Hi,

when running following code on Android the UI freezes while reading the file.

```
console.log("LOAD from file");
const contents = await RNFS.readFile(RNFS.DocumentDirectoryPath+"/myfile.data");
```

The file is rather large (10MB). I read the note on readFile:
> Note: you will take quite a performance hit if you are reading big files

But how can I run the reading in the background?

In iOS the screen does not freeze or only freezes for a short period as the reading happens much faster.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.