react-native-fetch-blob
Advanced tools
Comparing version 0.9.5-beta.4 to 0.9.5
{ | ||
"name": "react-native-fetch-blob", | ||
"version": "0.9.5-beta.4", | ||
"version": "0.9.5", | ||
"description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,2 +7,4 @@ # react-native-fetch-blob | ||
# [Please visit our Github Page for latest document](https://github.com/wkh237/react-native-fetch-blob) | ||
## Features | ||
@@ -15,4 +17,2 @@ - Transfer data directly from/to storage without BASE64 bridging | ||
> The npm package is inside `src` folder, if you're going to install via git repository do not directly poiint to this folder | ||
## TOC | ||
@@ -162,2 +162,4 @@ * [About](#user-content-about) | ||
> It is Worth to mentioning that the HTTP request uses cache by default, if you're going to disable it simply add a Cache Control header `'Cache-Control' : 'no-store'` | ||
> After 0.9.4, we disabled `Chunked` transfer encoding by default, if you're going to use it, you should explicitly set header `Transfer-Encoding` to `Chunked`. | ||
@@ -274,3 +276,3 @@ | ||
// here's the body you're going to send, should be a BASE64 encoded string | ||
// (you can use "base64" APIs to make one). | ||
// (you can use "base64"(refer to the library 'mathiasbynens/base64') APIs to make one). | ||
// The data will be converted to "byte array"(say, blob) before request sent. | ||
@@ -716,6 +718,8 @@ }, base64ImageString) | ||
**Reduce RCT Bridge and BASE64 Overheard** | ||
**Read Stream Event Overhead** | ||
When reading data via `fs.readStream` the process seems blocking JS thread when file is large, it's because the default buffer size is quite small (4kb) which result in large amount of events triggered in JS thread, try to increase the buffer size (for example 100kb = 102400) and set a larger interval (which is introduced in 0.9.4 default value is 10ms) to limit the frequency. | ||
**Reduce RCT Bridge and BASE64 Overhead** | ||
React Native connects JS and Native context by passing JSON around React Native bridge, and there will be an overhead to convert data before they sent to each side. 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. | ||
@@ -722,0 +726,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
363878
744