Sonerezh / sonerezh

A self-hosted, web-based application to stream your music, everywhere.
https://www.sonerezh.bzh
GNU Affero General Public License v3.0
769 stars 122 forks source link

Limit the size of sonerezh in the browser cache #247

Open MightyCreak opened 7 years ago

MightyCreak commented 7 years ago

Hi!

After playing a couple of albums, my cache hits its maximum (350 MB) removing the old cache.

I think it's important that the next song is pre-buffered, but I don't think we need to have all the songs cached. I'm not even sure it's useful at all actually, since the cache is filled by a javascript code, not by a URL request to the server. I don't know if Firefox is smart enough to connect the dots here.

The problem with saturating the cache too quickly is that, because of sonerezh playing in the corner, your whole browsing experience gets slowed down since your cache is wiped out every 3 albums you hear. And it includes the album covers in sonerezh which makes also sonerezh appears to be sluggish (the difference between with and without covers cache is really noticeable).

Do you think it is doable that the next song is always buffered in one buffer only? Limiting the size taken is the cache to the size of the next buffered song.

MightyCreak commented 7 years ago

@lGuillaume124 @atomiix this is a more and more concerning issue. My entire browser cache gets wiped out in just three hours of playing music. This is becoming a problem with other cache dependent services like Nextcloud (my login times are going through the roof if there is no cache).

Since this feature actually slows down the entire web browsing experience for all the users, I think this issue should be triaged as an important bug to be addressed for the next release.