I recently noticed that Importer2::_precacheArtistImage -always-
recaches the artist images during a scan. Further investigation showed
that this was because the key in the imgproxy.db cache includes the
Artist ID, which was changing on every full rescan. This leads to two
problems.

Yep, something I've wanted to address for a while...

https://github.com/Logitech/slimserver/issues/397

- imgproxy.db grows on each scan because all the old items are left in
   (I confirmed this with the DatabaseQuery plugin).

They should expire eventually. But they'd sit there for weeks indeed.

To measure the performance effect, I modified the MAI ImageProxy cache
to use the utf8-escaped artist names instead of the Artist IDs, and the
ArtistPictureLookup time for 1287 artists dropped from 40 seconds on the
first scan down to 3 seconds on subsequent scans! After making some

Yeah, that should work - except in the rare case of two different artists of the same name, which got different Musicbrainz IDs.

small changes to CustomBrowse and TrackStat to use the new cache keys,
things seem to work alright, at least in a quick ride around the block.

How would these plugins interact with the MAI cache?

Does my analysis seem correct? Is there anything wrong with my solution?
I'm happy to share the code changes. Does anything in addition to

Yes, please share with me.

artists in MAI use similarly unstable ids? In either case, I'm assuming

I'd have to double check. Certainly nothing which has such a big impact on the cache size.
_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to