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. Parallel Upload Support (FileUploadWorker.kt)
  2. Compatibility change in FileUploadHelper.kt

P.s. I am new to Kotlin so may need some support. I am raising this as a draft to get early feedback. I have only done manual testing thus far, with great results. I will start looking into adding tests as soon as possible

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants