jpochyla / psst

Fast and multi-platform Spotify client with native GUI
MIT License
8.48k stars 217 forks source link

Slow response (API calls) when operating through VPN #278

Open jacksongoode opened 2 years ago

jacksongoode commented 2 years ago

When using a VPN (in my case Mullvad on Fedora 35), Psst is considerably slower in requests and the UI blocks as a result. In my tests, I don't latency could really be a factor here as I only go from ~9ms to ~20ms with VPN off to on. I'm not sure what the hang could be - perhaps it's at Spotify's end? - But definitely something to note?

kingosticks commented 2 years ago

Are you saying that using psst while connected to your VPN is slower than using the official client while connected to your VPN? Or that using psst while connected to your VPN is closer than using psst while not using your VPN? It's always going to be slower through a VPN, seemingly twice as slow by your measurement - which sounds reasonable. You are, after all, forcibly sending your traffic the wrong way. How are you measuring the latency to Spotify's servers?

jacksongoode commented 2 years ago

Are you saying that using psst while connected to your VPN is slower than using the official client while connected to your VPN? Or that using psst while connected to your VPN is closer than using psst while not using your VPN? It's always going to be slower through a VPN, seemingly twice as slow by your measurement - which sounds reasonable. You are, after all, forcibly sending your traffic the wrong way.

Yes, it makes sense that there would be some delay in requests - but it really should only be subtle, I can't imagine it would exceed 100ms right? The tested VPN location is within 50km of my location. However, the response time delay increase is in the factor of 4 or 5 times longer. This, to me, seems like either Spotify isn't happy with the request origin (the VPN IP?) or there's some hang up within Psst.

How are you measuring the latency to Spotify's servers?

Pinging spotify.com

jpochyla commented 2 years ago

That's, uhh... strange? No idea where to look at the moment :|

kingosticks commented 2 years ago

@jacksongoode can you provide which access point is being used in both instances. Psst logs a trace message with this info.