hinto-janai/festival

Huge memory footprint

LukeZBaker opened this issue · 3 comments

Huge memory footprint

Hadn't really thought of checking out how much memory Festival consumes. Turns out, in my case, with a ~1300 album collections it's around 1.1GB. Which is way too much!

Most of the memory usage is from album art.

All album art (500x500 versions) is held in memory so that there is no loading. Other music players that do this (e.g Lollypop) will use similar amounts of memory (although Lollypop uses 300x300).

I agree it's a lot of memory usage but it's not a bug, the images have to be in memory unless slowly (de)allocating images each time they (dis)appear and using CPU time is seen as a better tradeoff, like MusicBee does.

OK, maybe not a bug, but certainly a design flaw.

I've reviewed dozens of open source music players, and Festival sadly has the biggest memory footprint (even larger than bloated Electron-based players). All because the design wastes huge amounts of memory permanently caching album covers to save a few CPU cycles.

And Lollypop uses far less memory according to ps_mem.

At least give users some options e.g. set the size of the cache.