Skip to content

- Limit URLSession connections per host to 1 when enabled#32

Merged
patricioxavier8 merged 1 commit intofeature/workspacesfrom
feature/low-bandwidth-mode-lib
Mar 23, 2026
Merged

- Limit URLSession connections per host to 1 when enabled#32
patricioxavier8 merged 1 commit intofeature/workspacesfrom
feature/low-bandwidth-mode-lib

Conversation

@patricioxavier8
Copy link
Copy Markdown
Contributor

In this PR ,Introduces a new user-facing setting to reduce the app's network bandwidth consumption, preventing it from saturating the user's connection during heavy syncs or backups.

  • Upload, UploadMultipart, Download: When enabled, URLSession is configured with httpMaximumConnectionsPerHost = 1 (default is 6)
  • NetworkFacade: Multipart chunk uploads serialized (maxConcurrentOperationCount = 1)
  • UploadPartOperation: Hard speed cap via post-upload delay — each 50MB chunk measures its upload duration and sleeps the remaining time to enforce a 10 MB/s ceiling
  • Speed cap constant THROTTLE_BYTES_PER_SECOND is easily adjustable

- Serialize multipart chunk uploads (concurrency 1 vs 6)
- Enforce 10 MB/s hard speed cap via post-upload delay in chunks
@patricioxavier8 patricioxavier8 requested a review from sg-gs March 20, 2026 22:27
Copy link
Copy Markdown
Member

@sg-gs sg-gs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see if the download is slowed down too in QA

@patricioxavier8 patricioxavier8 merged commit 2d26eda into feature/workspaces Mar 23, 2026
1 check failed
@patricioxavier8 patricioxavier8 deleted the feature/low-bandwidth-mode-lib branch March 23, 2026 12:14
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