Get performance degrades 10x
See original GitHub issueI’m new to PouchDB / CouchDB. Very excited to find your package on account of the performance gains. Alas, I’m seeing performance problems. I guess it’s something on my side, but I’m not sure how to investigate / debug. Any input would be greatly appreciated.
I have 3 PouchDB databases which are doing one way replication from a cloudant instance. The databases are ~8k records 22MB, ~150 records 210k, ~3.5k records 5MB. The data is synced very quickly into my local PouchDB databases.
I can .allDocs()
on the ~150 record database in ~200ms. Performance is great.
I’m trying to fetch ~350 documents from the database with 8k records. If I use .allDocs({keys: [...]})
it takes >40s to load the data. If I iterate with a Promise.each([...])
(from bluebird) to fetch each record serially via .get(id)
, each fetch can take up to 3s or more.
If I disable { adapter: "react-native-sqlite" }
line, then performance is significantly better in the iOS simulator. The ~350 documents load in ~4s (via the serial fetch method).
Any advice on how I can debug this issue?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
PS: Thanks for the advice so far, that
startkey
/endkey
optimisation has gotten us from unacceptable performance into the realm of acceptable, really appreciate it.I guess it’s ok to close. Thanks