alpha0010 / react-native-file-access

Filesystem access for React Native
MIT License
298 stars 18 forks source link

readFile() freezes for some seconds when reading small files #45

Closed andra961 closed 2 years ago

andra961 commented 2 years ago

Hi, is it normal that when i read a 2MB pdf through readFile() function with base64 encoding, the app freezes for some second?Perceived time would me much less if i could use a spinner while the file is being read, since readFile is async, but it doesn't work :(

alpha0010 commented 2 years ago

Hmm, that does not seem right. Is this Android, iOS, or both? Simulator or physical device?

andra961 commented 2 years ago

Hmm, that does not seem right. Is this Android, iOS, or both? Simulator or physical device?

Android, tried on both emulator and physical device, same result. I also tried 'react-native-blob-util', the other package you suggest, and even though its readFile() also takes 1-2 seconds to load, atleast the spinner works with it since ui doesn't freeze(it has other problems though).

alpha0010 commented 2 years ago

Should be fixed in v2.2.2.