Closed balupton closed 6 years ago
Great idea! Feel free to make a PR, not sure how quickly I'll be able to implement this.
ok let me see what I can do
Just ran a test using bluebird Promise.map
test set of:
backupDocument
with a concurrency of:
backupDocument
with a concurrency of 3 and backupCollection
with a concurrency of:
Thoughts on using bluebird?
@jeremylorino what is that in comparison to?
Is it in comparison the sync version, or the async version at https://github.com/steadyequipment/node-firestore-backup/pull/17
Sorry, I define "concurrency of 1" by using the original code that uses the function promiseSerial
.
FYI the total amount of data that was backed up in all cases was 195MB
@jeremylorino using bluebird is fine! This tasks is interested in providing any async option, which I think is @balupton 's point. It would be great to know the comparison of Javascript Promises to Bluebird promises! I commented in the PR, it would be great if we could make Bluebird (and other future Promise libraries) optional and provide said data for users to decide.
I also appreciate that you did a diminishing returns analysis! Do you know what became the limiting factor? It would be good to know if that is something specific to a situation and whether we should leave it up to the user to analyze decide.
Sweeeet.
I will take a look at the comments on the PR and answer your demising returns questions when I have a chance later today.
Thanks for the input!
@yoiang the latest release closes this. Correct?
I have about 20 million documents in the firestore to export - at the current rate the exporter seems it exports about 2 a second.
Is it possible for the document downloads to happen in a batch in parallel, so like 20 at a time? As the one-at-a-time serial mode seem to be the bottleneck here.