swingmx / swingmusic

Swing Music is a beautiful, self-hosted music player for your local audio files. Like a cooler Spotify ... but bring your own music.
https://swingmx.com
MIT License
666 stars 41 forks source link

About memory usage #181

Open hausen1012 opened 4 months ago

hausen1012 commented 4 months ago

I really like Swingmusic because I think it's lightweight, but currently it seems to have a problem. When I don't play a song, it takes up over 100 MB of memory. When I play a song and frequently switch songs, it can take up over 400 MB. When I use Jellyfin, in conjunction with the fintunes app, no matter how I switch, it will not cause the memory usage to increase. Is this due to streaming?

sortedcord commented 4 months ago

I can't reproduce this. I have my installation running in a docker container. I have my installation running in a docker container. On idle, it takes about 200MB and it stays more or less the same when playing a song...

cwilvx commented 4 months ago

Hello @hausen1012

I acknowledge this issue and I have tried to figure out why that's happening but couldn't get much. I noted that on most API calls, the memory increases by a few kilobytes/MBs, but never goes back down once the requests are completed. It's weird but I can't tell why. It's not caused by streaming (I left a fresh instance streaming for ~8hrs and the memory wasn't dramatic).