You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Nextcloud Android client does not currently feature any way to limit bandwidth of the auto upload feature like the desktop client does. To add this feature this library would need to offer an API to limit the download and upload speed.
Why:
A client side limit is useful for cases where network bandwidth is limited and where the router the client is using is not smart enough to throttle invididual devices and insteads results in the entire network hanging (don't ask me how I know :P).
How:
I made a prototype to check the feasability of this by replacing the buffered input and output streams in DownloadFileRemoteOperation and FileRequestEntity with sources and sinks from okio which is a part of okhttp which is already included in the dependancies and then using a Throttler also from okio to then limit bandwidth. I ran some basic tests by uploading and downloading files using the sample client and on my setup upload and download speeds were within 5% of the original speed.
Alternativley an easier approach may be to just insert a delay in the buffer loops but that feels a little hacky to me compared to using okio.
The text was updated successfully, but these errors were encountered:
What:
The Nextcloud Android client does not currently feature any way to limit bandwidth of the auto upload feature like the desktop client does. To add this feature this library would need to offer an API to limit the download and upload speed.
Why:
A client side limit is useful for cases where network bandwidth is limited and where the router the client is using is not smart enough to throttle invididual devices and insteads results in the entire network hanging (don't ask me how I know :P).
How:
I made a prototype to check the feasability of this by replacing the buffered input and output streams in DownloadFileRemoteOperation and FileRequestEntity with sources and sinks from okio which is a part of okhttp which is already included in the dependancies and then using a Throttler also from okio to then limit bandwidth. I ran some basic tests by uploading and downloading files using the sample client and on my setup upload and download speeds were within 5% of the original speed.
Alternativley an easier approach may be to just insert a delay in the buffer loops but that feels a little hacky to me compared to using okio.
The text was updated successfully, but these errors were encountered: