itinance / itinance/react-native-fs

unlink a folder freeze the app

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

Description

So I was using my own native File handler for android and decided to support more platforms. That is why I decided to use `react-native-fs` instead as it support more then one platform.

Now, I am using `react-native-zip-archive` to unzip an `epub` file, and it create a temporary folder.

Now the Folder containe 1000+ files which I would need to remove later on.

`react-native-fs` unlink the folder herarkie which is really great except that it freeze the app until unlink operation is done, which is really bad for me.

When I looked at the code I could not help notice that you do not create an external thread like I did with my native module and that is why the app freezes.

After checking, found also that it happen when reading a large json file.

Why do you convert to base64 when I do not specify that. This make the operation even larger.

`read` dose not return currect length when using `utf8`. It adds more string. I guss `skip` operation dose not work as intended.

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.