cloudant / swift-cloudant

A Swift Lang client for Cloudant and CouchDB
Apache License 2.0
42 stars 20 forks source link

Performance Improvement needs : when getting batch data from cloudant db #157

Closed yinglidl closed 7 years ago

yinglidl commented 7 years ago

Please include the following information in your ticket.

ricellis commented 7 years ago

You could try using the GetAllDocsOperation with keys of the doc IDs that you want and includeDocs. That will make just one request instead of one per doc ID.

yinglidl commented 7 years ago

Thank you for your advice, we have tried GetAllDocsOperation ,still it needs almost the same time to response...

ricellis commented 7 years ago

Does it take nearly the same time to get the same documents using another tool, for example like curl? I don't think swift-cloudant does anything that should particularly slow things down, it could just be limited by the document size and the network connection or if you are being rate limited on your Cloudant account (and you've configured backoff).

yinglidl commented 7 years ago

I have tried according to your comment, and it works now very well. Thank you so much !