-
Notifications
You must be signed in to change notification settings - Fork 342
feat(storage-manager): add multi-file zipdownload #6746
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
base: main
Are you sure you want to change the base?
Conversation
|
c2ef4d9 to
7063657
Compare
7063657 to
3b150ce
Compare
cd71da6 to
d043b7b
Compare
|
there is no changeset by design. |
d043b7b to
e45e0de
Compare
e45e0de to
e7b5168
Compare
| } | ||
| }); | ||
| } | ||
| }, 250); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: what's the reason behind 250ms specifically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the issue is, that the handler gets invoked for every file individually.
The handler itself manages a queue of files to download or which are downloading.
Since the download-handler, is only invoked on 4 files at a time, it can happen, that before the next file is being queued by the storage-manager, the download-handler "thinks" the queue is empty and assumes it has processed all files.
this small delay, gives the storage-manager some time push more files into the download-handler, and thus continue downloading.
It would be much more beneficial, if the action-handlers would know how many files are being processed in total e.g. like Array.map, where the signature is <T, R>(item: T, index: number, all: T[]) => R[]
but I'll do a follow-up on this one in another PR
Description of changes
Issue #, if available
Description of how you validated changes
Checklist
yarn testpasses and tests are updated/addeddocs,e2e,examples, or other private packages.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.