Skip to content

Commit b1a52b6

Browse files
committed
Add benchmark result
1 parent 5f8ef20 commit b1a52b6

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,27 @@ pouchdb-adapter-react-native-sqlite
33

44
PouchDB adapter using ReactNative SQLite as its backing store.
55

6+
### Why?
7+
8+
SQLite storage performs much faster than AsyncStorage, especially with secondary index.
9+
Here is benchmark results:
10+
11+
| 1) `allDocs` speed | min | max | mean |
12+
|---------------|------|------|------|
13+
| AsyncStorage | 72ms | 94ms | 77ms |
14+
| SQLite | 27ms | 39ms | 28ms |
15+
16+
| 2) `query` speed | min | max | mean |
17+
|---------------|--------|--------|--------|
18+
| AsyncStorage | 1075ms | 1117ms | 1092ms |
19+
| SQLite | 33ms | 39ms | 35ms |
20+
21+
* Device: iPhone 6s
22+
* Documents: 434
23+
* Update seq: 453
24+
* Iterations: 100
25+
* Used options: `{ include_docs: true }`
26+
627
### Prerequisites
728

829
- [pouchdb-react-native](https://github.com/stockulus/pouchdb-react-native)

0 commit comments

Comments
 (0)