Skip to content

Commit da18cba

Browse files
authored
Merge pull request #2 from hnq90/enhancement/add_bulkdocs_benchmark
Upgrade PouchDB and Add bulkDocs benchmark
2 parents 2c5648f + 42a7440 commit da18cba

File tree

3 files changed

+31
-10
lines changed

3 files changed

+31
-10
lines changed

Diff for: LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Takuya Matsuyama
3+
Copyright (c) 2017 Takuya Matsuyama
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Diff for: README.md

+26-5
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,34 @@ Here is benchmark results:
1414
| SQLite | 27ms | 39ms | 28ms |
1515

1616
| 2) `query` speed | min | max | mean |
17-
|---------------|--------|--------|--------|
18-
| AsyncStorage | 1075ms | 1117ms | 1092ms |
19-
| SQLite | 33ms | 39ms | 35ms |
17+
|---------------|---------|---------|---------|
18+
| AsyncStorage | 1,075ms | 1,117ms | 1,092ms |
19+
| SQLite | 33ms | 39ms | 35ms |
2020

2121
* Device: iPhone 6s
2222
* Documents: 434
2323
* Update seq: 453
2424
* Iterations: 100
2525
* Used options: `{ include_docs: true }`
2626

27+
#### On Simulator
28+
29+
* Device: iPad Pro 9.7" (Simulator) - iOS 10.3.2
30+
* Documents: 5000
31+
32+
| 3) `bulkDocs` speed | total | mean |
33+
|---------------|----------|--------|
34+
| AsyncStorage | 25.821ms | 5.16ms |
35+
| SQLite | 22.213ms | 4.44ms |
36+
37+
| 4) `allDocs` speed | total | mean |
38+
|---------------|-----------|---------|
39+
| AsyncStorage | 189,379ms | 37.87ms |
40+
| SQLite | 30,527ms | 6.10ms |
41+
42+
* `allDocs` options: `{ include_docs: true, attachments: true }`
43+
* Using this test [script](https://gist.github.com/hnq90/972f6597a0927f45d9075b8627892783)
44+
2745
### Prerequisites
2846

2947
- [pouchdb-react-native](https://github.com/stockulus/pouchdb-react-native)
@@ -54,7 +72,10 @@ const db = new PouchDB('mydb.db', {adapter: 'react-native-sqlite'});
5472

5573
## Changelog
5674

75+
- 1.0.2
76+
+ Upgrade pouchdb-util & pouchdb-adapter-websql-core to 6.2.0
77+
+ Update benchmark result
5778
- 1.0.1
58-
- Remove unnecessary console output
79+
+ Remove unnecessary console output
5980
- 1.0.0
60-
- Initial release
81+
+ Initial release

Diff for: package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pouchdb-adapter-react-native-sqlite",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "PouchDB adapter using ReactNative SQLite Plugin as its data store.",
55
"main": "./lib/index.js",
66
"keywords": [],
@@ -14,10 +14,10 @@
1414
"test": "standard"
1515
},
1616
"dependencies": {
17-
"pouchdb-adapter-websql-core": "6.1.0",
18-
"pouchdb-utils": "6.1.0"
17+
"pouchdb-adapter-websql-core": "6.2.0",
18+
"pouchdb-utils": "6.2.0"
1919
},
2020
"devDependencies": {
21-
"standard": "^7.1.2"
21+
"standard": "^10.0.2"
2222
}
2323
}

0 commit comments

Comments
 (0)