Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 277f806

Browse files
authored
Update README.md
1 parent 23d9e07 commit 277f806

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ A project committed to make file acess and data transfer easier, effiecient for
3434

3535
## About
3636

37-
This project was initially for solving the issue [facebook/react-native#854](https://github.com/facebook/react-native/issues/854), because React Native does not support `Blob` object and it will cause some problem when sending and receiving binary data. There's aleady [a PR ](https://github.com/facebook/react-native/pull/8324) merged into RN master branch which will probably solving the issue in the near future.
37+
This project was initially for solving the issue [facebook/react-native#854](https://github.com/facebook/react-native/issues/854), because React Native lack of `Blob` implementation and it will cause some problem when transfering binary data. Now, this project is committed to make file access and transfer more easier, effiecient for React Native developers. We've implemented highly customizable filesystem and network module which plays well together. For example, upload and download data directly from/to storage which is much more efficient in some cases(especially for large ones). The file system supports file stream, so you don't have to worry about OOM problem when accessing large files.
3838

39-
Now, this project is committed to make file acess and transfer more easier and more effiecient for React Native developers. We've implemented lot of file access function which plays well with our network module. For example, it can upload and download data directly into/from file system, which is much more performant (especially for large ones) than converting data to BASE64 passing them around through React JS Bridge, also, file stream support so that you can read large file not causing OOM error.
39+
In `0.8.0` we introduced experimential Web API polyfills that make it possible to use browser-based libraries in React Native, for example, [FireBase JS SDK](https://github.com/wkh237/rn-firebase-storage-upload-sample)
4040

4141
## Installation
4242

@@ -656,7 +656,7 @@ After `0.8.0` we've made some [Web API polyfills](https://github.com/wkh237/reac
656656

657657
**Reduce RCT Bridge Overhead and BASE64 Time**
658658

659-
React Native connects JS and Native context by passing JSON through RCT bridge, therefore there will an overhead to convert data before they sent. When data is large, this will be quite a performance impact to your app. When upload and download large data it's better to use file storage instead of BASE64 encoding. The following chart shows how much faster when loading a data from storage than BASE64 encoded string on iphone 6.
659+
React Native connects JS and Native context by passing JSON through React bridge, therefore there will be an overhead to convert data before they sent. When data is large, this will be quite a performance impact to your app, it's recommended to use file storage instead of BASE64 if possible. The following chart shows how much faster when loading data from storage than BASE64 encoded string on iphone 6.
660660

661661
<img src="img/performance_1.png" style="width : 100%"/>
662662

@@ -666,6 +666,12 @@ Due to the [lack of typed array implementation in JavascriptCore, and limitation
666666

667667
<img src="img/performance_encoding.png" style="width : 100%"/>
668668

669+
**Concate and Replacing Files**
670+
671+
If you're going to concatenate files, you don't have to read the data to JS context anymore ! In `0.8.0` we introduced new encoding `uri` for writeFile and appendFile API. Which make it possible to done the whole process in native.
672+
673+
<img src="img/performance_f2f.png" style="width : 100%"/>
674+
669675
## Changes
670676

671677
| Version | |

0 commit comments

Comments
 (0)