mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
b588d9fd07
- Keep using the same hyper client instead of building a new one for each request - This allows the client to reuse connections and improves the performance of multiple requests by almost 2x. - The playlist_tracks example takes 38 secs before and 20 secs after the change to enumerate a 180 track playlist - To avoid carrying the hyper Client generics through the whole project, `ProxyConnector` is always used as the Connector, but disabled when not using a proxy. - The client creation is done lazily to keep the `HttpClient::new` without a `Result` return type |
||
---|---|---|
.. | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |