Skip to content

Conversation

@k0raph
Copy link

@k0raph k0raph commented Jan 12, 2026

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

  1. Changing FileUploadWorker.kt to support parallel Uploads
  2. Compatibility change in FileUploadHelper.kt
  3. Unit tests for FileUploadWorker.kt (extracted out dependencies to make testing easier)
  4. IT for (batch) uploading of files
  5. Shared preference "max_concurrent_uploads" to allow users to configure their own concurrency limits
Screenshot 2026-01-18 182201 Screenshot 2026-01-18 182117
  • Tests written, or not not needed

…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>
@k0raph k0raph force-pushed the parallelise-uploads branch from bd4ef78 to 1a5bac6 Compare January 12, 2026 00:06
Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
/**
* The maximum number of concurrent parallel uploads
*/
const val MAX_CONCURRENT_UPLOADS = 10
Copy link
Author

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?

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.

Copy link
Author

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.

k0raph and others added 4 commits January 12, 2026 08:26
…ting easier. Added various unit tests and an IT to test the FileUploadWorker

Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
…ting easier. Added various unit tests and an IT to test the FileUploadWorker

Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
k0raph and others added 5 commits January 18, 2026 23:48
…current uploads

Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
…loads

Shared preference - Max concurrent uploads
Signed-off-by: Raphael Vieira <raphaelecv@hotmail.com>
@k0raph k0raph marked this pull request as ready for review January 19, 2026 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants