.upload with FileDataPart is slow?
See original GitHub issueThis is for version 2.0.1 Don’t know why, but this code (serviceUrl is localhost in my case):
val response = Fuel.upload(serviceUrl/"jars"/"upload")
.add(FileDataPart(file = fileToUpload, name = "jarfile", contentType = "application/java-archive"))
.awaitObject(uploadJarDeserializer)
is very slow on large files (over 100 MB). When I switch to
val response = Fuel.upload(serviceUrl/"jars"/"upload")
.add(BlobDataPart(inputStream = fileToUpload.inputStream(), name = "jarfile", filename = fileToUpload.name, contentType = "application/java-archive"))
.awaitObject(uploadJarDeserializer)
it is very fast, as expected.
So by replacing FileDataPart to BlobDataPart - I have improved a performance in order of magnitude. Am I doing something wrong with FileDataPart?
Issue Analytics
- State:
- Created 4 years ago
- Comments:9
Top Results From Across the Web
File upload is taking really long - QuickReviewer
File upload is taking really long. If you're facing the frustration of slow upload speeds there are a few things you need to...
Read more >Java file uploading painfully slow - android - Stack Overflow
It sounds as if the app which is sending the data from the Android end isn't closing the connection when it finishes sending...
Read more >Why are my Online Resources files uploading slowly?
If your upload is slower than expected, it could be due to multiple factors, including: Lower overall upload speeds provided by your particular...
Read more >How to optimize upload speed? - Hightail - Zendesk
Troubleshooting Steps if you notice a slow upload speed: If your upload speeds are slower than you think they should be there may...
Read more >PDF - File is Too Large to Upload or Upload is Very Slow
To determine the size of a document when you have it open in Adobe Acrobat, click on File > Document Properties or press...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ugh. @mobiletoly, yes you are right.
setFixedLengthStreamingMode
is supposed to be faster thansetChunkedStreamingMode
. However, this is enough information for us to do some debugging here.Thank you for the time ❤️
this is desktop app (TornadoFX-based app), running on my Mac, so no Android. Using BlobDataPart is very fast, using Apache HttpClient is very fast, it is only when I use FileDataPart I start having issues.