microsoftgraph / msgraph-sdk-dotnet

Microsoft Graph Client Library for .NET!
https://graph.microsoft.com
Other
704 stars 252 forks source link

Please add the option to upload files chunks in parallel to improve upload speed for OneDrive #1647

Open Emasoft opened 1 year ago

Emasoft commented 1 year ago

Is your feature request related to a problem? Please describe. I'm always frustrated with the poor upload speed of OneDrive when using the LargeFileUploadTask as explained in the MS Documentation. Even on my fiber adsl, capable of 250Mbps upload speed (≈30Mbytes/s) the file is uploaded at 2-3 Mbyte/s. This is true even on platforms other than Windows, like Mac, iOS or Android.

Describe the solution you'd like The solution I propose is to allow multi chunks uploads in parallel with a new Task called LargeFileParallelUploadTask. This should be able to open multiple simultaneous connections to the server and upload many chunks in parallel, filling the available user upload bandwidth.

Describe alternatives you've considered An alternative that my clients mention is to use the OneDrive web client browser, that for some reason is much faster (I tested it and it uploads at a speed of 27.8 Mbyte/s , saturating my upload bandwidth). Some clients are reclutant to use my apps because they are slower compared to the OneDrive web client browser. The only thing that keep them using my apps is the ability to schedule automatic backups, an ability missing from the browser.

robinmeure commented 1 year ago

Any update on this @andrueastman ?

KnapSac commented 1 year ago

@andrueastman would you be interested in a PR adding an alternative upload task which supports chunked uploads? That could serve as a good stepping stone towards a parallel version of that task.

andrueastman commented 9 months ago

Holding this for now as the API does not support parallel chunk uploading. https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0&preserve-view=true#upload-bytes-to-the-upload-session image