Sequential requests when downloading file
See original GitHub issueI’m using the File.download
method and was wondering if its performance could be improved.
Currently it makes two requests sequentially:
- /storage/…/key?alt=media to download the file
- /storage/…/key to download file metadata
Would it be possible to make those requests in parallel? The second request adds another 20 - 250ms to the download.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to Download Multiple Files Concurrently in Python
You can use requests for downloading files hosted over http protocol. Run the following command to install requests python library.
Read more >Downloading multiple files with requests in Python
I have 3 download links in a list. Only the last file in the list is downloaded completely. The others have a file...
Read more >Sequential downloading is bad - VuzeWiki
Sequential downloading is bad. Since people who have no understanding how bittorrent works often request that files or even pieces should be downloaded...
Read more >Use Python to Download Multiple Files (or URLs) in Parallel
The easiest way to download files is using a simple Python loop to iterate through a list of URLs to download. This serial...
Read more >Download Multiple Files (or ULRs) in Parallel with Python
Learn how to use Python to download multiple files (or URLs) in parallel. Downloading file in parallel is very easy with Python.
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 Free
Top 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
Thanks @stephenplusplus for implementing this, and thanks @danvk for pointing out the second request isn’t necessary!
Just deployed this earlier and reads are now 50% faster.
Also seems like some metadata requests were really slow, and now the max duration is down significantly.
@danvk It’s a Grafana dashboard running on Hosted Metrics. I think Grafana also has their own Cloud offering too.