Skip to content

Commit

Permalink
Merge pull request #2 from hnq90/enhancement/add_bulkdocs_benchmark
Browse files Browse the repository at this point in the history
Upgrade PouchDB and Add bulkDocs benchmark
  • Loading branch information
craftzdog committed Jun 9, 2017
2 parents 2c5648f + 42a7440 commit da18cba
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 Takuya Matsuyama
Copyright (c) 2017 Takuya Matsuyama

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
31 changes: 26 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,34 @@ Here is benchmark results:
| SQLite | 27ms | 39ms | 28ms |

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

* Device: iPhone 6s
* Documents: 434
* Update seq: 453
* Iterations: 100
* Used options: `{ include_docs: true }`

#### On Simulator

* Device: iPad Pro 9.7" (Simulator) - iOS 10.3.2
* Documents: 5000

| 3) `bulkDocs` speed | total | mean |
|---------------|----------|--------|
| AsyncStorage | 25.821ms | 5.16ms |
| SQLite | 22.213ms | 4.44ms |

| 4) `allDocs` speed | total | mean |
|---------------|-----------|---------|
| AsyncStorage | 189,379ms | 37.87ms |
| SQLite | 30,527ms | 6.10ms |

* `allDocs` options: `{ include_docs: true, attachments: true }`
* Using this test [script](https://gist.github.com/hnq90/972f6597a0927f45d9075b8627892783)

### Prerequisites

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

## Changelog

- 1.0.2
+ Upgrade pouchdb-util & pouchdb-adapter-websql-core to 6.2.0
+ Update benchmark result
- 1.0.1
- Remove unnecessary console output
+ Remove unnecessary console output
- 1.0.0
- Initial release
+ Initial release
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pouchdb-adapter-react-native-sqlite",
"version": "1.0.1",
"version": "1.0.2",
"description": "PouchDB adapter using ReactNative SQLite Plugin as its data store.",
"main": "./lib/index.js",
"keywords": [],
Expand All @@ -14,10 +14,10 @@
"test": "standard"
},
"dependencies": {
"pouchdb-adapter-websql-core": "6.1.0",
"pouchdb-utils": "6.1.0"
"pouchdb-adapter-websql-core": "6.2.0",
"pouchdb-utils": "6.2.0"
},
"devDependencies": {
"standard": "^7.1.2"
"standard": "^10.0.2"
}
}

0 comments on commit da18cba

Please sign in to comment.