-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Parallelise uploads #16268
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: master
Are you sure you want to change the base?
Parallelise uploads #16268
Conversation
…ad safe vars and make sure UI updates accordingly Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
… safety Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
…progress Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
bd4ef78 to
1a5bac6
Compare
Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
| /** | ||
| * The maximum number of concurrent parallel uploads | ||
| */ | ||
| const val MAX_CONCURRENT_UPLOADS = 10 |
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.
Should the user be given flexibility over this field?
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.
It would be helpfull as depending on the phone specs and "bloat" on the phone it may freeze or lag substantially.
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.
I've added a shared preference - "Max concurrent uploads", that the user can configure.
…ting easier. Added various unit tests and an IT to test the FileUploadWorker Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
…roid into parallelise-uploads
…ting easier. Added various unit tests and an IT to test the FileUploadWorker Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
…current uploads Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
…loads Shared preference - Max concurrent uploads
Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
…roid into parallelise-uploads
Issue: #10124
This PR aims to introduce improvements to the file upload process by parallelizing uploads using Kotlin Coroutines and a Semaphore (which I defaulted to 10 concurrent tasks) to improve throughput.
Key Changes