icidasset / diffuse

A music player that connects to your cloud/distributed storage.
https://diffuse.sh
Other
808 stars 67 forks source link

Improve Google Drive integration performance #338

Closed icidasset closed 6 days ago

icidasset commented 2 years ago

Using Google Drive as a source is not recommended because the Google Drive API can only handle so many requests, and Diffuse makes a lot of requests. Specifically because Diffuse only requests small parts of files to get the metadata of the audio. The Google Drive API also does a redirect on each request, so all of that combined results in a poor performance leading to missing metadata and files in Diffuse (see #335 for example).

Maybe there's a way to improve the performance, eg. by batching requests? See https://developers.google.com/drive/api/guides/performance Not sure how to achieve that though, we use external libraries to request the metadata from audio files via URLs. We could maybe hack something together in the service worker? 🤷