Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance PouchDB, with sqldown: very slow.... it is ok? #3167

Closed
jacargentina opened this issue Dec 13, 2014 · 3 comments
Closed

Performance PouchDB, with sqldown: very slow.... it is ok? #3167

jacargentina opened this issue Dec 13, 2014 · 3 comments

Comments

@jacargentina
Copy link
Contributor

This little script on node, with current pouchdb, and latest sqldown, takes almost 2 minutes on windows, to bulk insert 200 little docs.

var PouchDB = require('pouchdb');

var db = new PouchDB('test', {
  db: require('sqldown')
});

var arr = [];
for (var i = 0; i < 200; i++) {
  arr.push({
    _id: i.toString(),
    value: i
  });
}
console.log('bulk start: ', new Date());
db.bulkDocs(arr)
  .then(function(r) {
    console.log('bulk end: ', new Date());
  });

My run gives this output:

node perf-pouch-sqldown.js
bulk start:  Sat Dec 13 2014 20:28:59
bulk end:  Sat Dec 13 2014 20:30:52

Is that right? @calvinmetcalf may be it is a sqldown issue?

@nolanlawson
Copy link
Member

Is that significantly slower than leveldown? I have been really curious to know the performance characteristics of different *down libraries like medeadown, leveldown, sqldown, jsondown, etc.

@calvinmetcalf
Copy link
Member

That is likely a bug in sqldown not pouchdb

On Sat, Dec 13, 2014, 7:22 PM Nolan Lawson notifications@github.com wrote:

Is that significantly slower than leveldown? I have been really curious to
know the performance characteristics of different *down libraries like
medeadown, leveldown, sqldown, jsondown, etc.


Reply to this email directly or view it on GitHub
#3167 (comment).

@jacargentina
Copy link
Contributor Author

@calvinmetcalf I tried medeadown as backend, same code: 1 sec.

So, yes, maybe sqldown has something which works, but VERY slow. Closing it, opening in sqldown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants