Skip to content

Release(2.0)

Latest
Compare
Choose a tag to compare
@Dessmondd Dessmondd released this 09 Dec 07:34
· 4 commits to main since this release
cbc3a4a

Hello everyone!

Will keep this short, most of the people that use this app currently download it from our discord so here i usually add the "nerd" patch notes :P

The app itself used to have quite a bad time with large files, so i wanted to do a little bit of a revamp in how it handles it so thats why this version will be called "2.0" specially because it actually improves error handling but also the performance in larger/big file sizes and also a big speed bump as well in the regular/small files too.

Streaming the Response:

This was key for the improvements by using stream=True in the requests.get call, the response content is not immediately downloaded into memory all at once, Instead, it allows the response to be downloaded in manageable chunks, which allows me to reduce memory usage, especially for large files! Isn't that awesome? c:

Chunked Download and Writing:

Downloading the file will occur in 1 MB chunks (chunk_size=1024 * 1024). Since this allows me to process the file in smaller segments, which is beneficial for both memory usage and overall performance. It avoids loading the entire file into memory before writing it to disk which is amazing!

And not less important the Progress Bar got updated, and it shows more accurately the status of the download by checking if total_bytes is None. If it is, the method returns early without updating the progress bar. This check ensures that the progress bar is only updated if the total size of the file is known.

If total_bytes is not None, it calculates the percentage of completion (done) based on the ratio of bytes_written to total_bytes. This ratio is multiplied by 100 to get a percentage value.

TL;DR

2.0 comes with big improvements in download speeds, and better error handling :)

Thanks for the feedback everyone!!