Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible To Increase Download Speeds #97

Closed
Rajeshsahoo12 opened this issue Mar 10, 2024 · 10 comments
Closed

Possible To Increase Download Speeds #97

Rajeshsahoo12 opened this issue Mar 10, 2024 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@Rajeshsahoo12
Copy link

Hi Dev,

As right now I have installed latest release of tidal-wave on windows based PC & using it. I use windows device access token to download hi-res lossless audio.

What I have experienced is slow download speeds which I never crossing 1.5 MB/s where as I have internet connection of bandwidth 80 MB/s.

Just a suggestion if it is possible to increase download speeds will be very helpful.

Thanks

@ebb-earl-co ebb-earl-co self-assigned this Mar 10, 2024
@ebb-earl-co ebb-earl-co added the enhancement New feature or request label Mar 10, 2024
@ebb-earl-co
Copy link
Owner

@Rajeshsahoo12 There will always be more to be done in order to increase download speed. However, it might be the case that TIDAL has a speed limit on API requests that is completely out of my hands! How have you arrived at this 1.5 MB/s figure?

Check out a new feature branch that I just created, called make-it-faster. It uses a drop-in replacement for the requests library called niquests and my very brief tests show a small speedup. Please test it out and let me know

PS > python.exe -m pip install https://github.com/ebb-earl-co/tidal-wave/archive/make-it-faster.zip

Separately, I have to say that I am not versed in HTTP performance at all. I know of a few things that can help HTTP2 performance, such as better header compression with HPACK or nghttp2, and niquests implements that. Other than this, I don't have the skills currently to dissect network performance in an astute way.

Nevertheless, chasing performance gains is always fun, so I will continue to experiment on the make-it-faster branch!

@Rajeshsahoo12
Copy link
Author

@Rajeshsahoo12 There will always be more to be done in order to increase download speed. However, it might be the case that TIDAL has a speed limit on API requests that is completely out of my hands! How have you arrived at this 1.5 MB/s figure?

Check out a new feature branch that I just created, called make-it-faster. It uses a drop-in replacement for the requests library called niquests and my very brief tests show a small speedup. Please test it out and let me know

PS > python.exe -m pip install https://github.com/ebb-earl-co/tidal-wave/archive/make-it-faster.zip

Separately, I have to say that I am not versed in HTTP performance at all. I know of a few things that can help HTTP2 performance, such as better header compression with HPACK or nghttp2, and niquests implements that. Other than this, I don't have the skills currently to dissect network performance in an astute way.

Nevertheless, chasing performance gains is always fun, so I will continue to experiment on the make-it-faster branch!

I have installed network speed meter program on my windows based PC which shows current network usage ( both download & upload) separately. And it shows speeds in MB/s as I have set it under preferences.

Let me try downloading make-it-faster branch & test the speeds.

@ebb-earl-co
Copy link
Owner

@Rajeshsahoo12 I'm seeing perhaps quite a good speedup switching from requests to httpx.

@Rajeshsahoo12
Copy link
Author

@Rajeshsahoo12 I'm seeing perhaps quite a good speedup switching from requests to httpx.

If I use this command to install make-it-faster branch. Will my default tidal-wave installation gets effected...?

PS > python.exe -m pip install https://github.com/ebb-earl-co/tidal-wave/archive/make-it-faster.zip

@ebb-earl-co
Copy link
Owner

@Rajeshsahoo12 I'm seeing perhaps quite a good speedup switching from requests to httpx.

If I use this command to install make-it-faster branch. Will my default tidal-wave installation gets effected...?

PS > python.exe -m pip install https://github.com/ebb-earl-co/tidal-wave/archive/make-it-faster.zip

Yes. You would be changing the version of tidal-wave installed. However, you could change it back at any time with

PS > python.exe -m pip install tidal-wave==2024.3.1

@Rajeshsahoo12
Copy link
Author

@Rajeshsahoo12 I'm seeing perhaps quite a good speedup switching from requests to httpx.

If I use this command to install make-it-faster branch. Will my default tidal-wave installation gets effected...?
PS > python.exe -m pip install https://github.com/ebb-earl-co/tidal-wave/archive/make-it-faster.zip

Yes. You would be changing the version of tidal-wave installed. However, you could change it back at any time with

PS > python.exe -m pip install tidal-wave==2024.3.1

Okay that is easy. As I have already installed make-it-faster branch now. And going try tidal link.

@Rajeshsahoo12
Copy link
Author

@ebb-earl-co Had used this command to install tidal-wave from this branch make-it-faster python.exe -m pip install https://github.com/ebb-earl-co/tidal-wave/archive/make-it-faster.zip

And used various album url to download but I did not notice any change in speeds.

@ebb-earl-co
Copy link
Owner

@ebb-earl-co Had used this command to install tidal-wave from this branch make-it-faster python.exe -m pip install https://github.com/ebb-earl-co/tidal-wave/archive/make-it-faster.zip

And used various album url to download but I did not notice any change in speeds.

How are you measuring speeds? For me, all I do is a simple Bash time command on the same album or playlist or track, comparing between the trunk and make-it-faster branches. This isn't controlling for network conditions, so the results are not great, but I don't have a framework for network speed testing

@Rajeshsahoo12
Copy link
Author

@ebb-earl-co Had used this command to install tidal-wave from this branch make-it-faster python.exe -m pip install https://github.com/ebb-earl-co/tidal-wave/archive/make-it-faster.zip
And used various album url to download but I did not notice any change in speeds.

How are you measuring speeds? For me, all I do is a simple Bash time command on the same album or playlist or track, comparing between the trunk and make-it-faster branches. This isn't controlling for network conditions, so the results are not great, but I don't have a framework for network speed testing

I had installed this tiny program on my windows based PC https://netspeedmonitor.en.softonic.com/. It measures networks traffic both inbound & outbound.

In both the branches speeds are same.

Thanks

@ebb-earl-co
Copy link
Owner

@Rajeshsahoo12 I have added HTTP caching support in version 2024.3.6. When you get a chance, please try it out and let me know if you see any speedup. N.b., I haven't changed the HTTP layer, but rather, when there are repeated requests to the same endpoint, tidal-wave will use the in-memory cached version instead of fetch the same response over HTTP again. This will decrease overall program execution time, but not round-trip time to the TIDAL API.

The time savings will be more pronounced on larger albums, as e.g. the artist metadata, album metadata, artist Bio will hit a cache instead of be re-fetched.

@ebb-earl-co ebb-earl-co closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants