Page 1 of 1

excessive cache writing

Posted: Sat Oct 03, 2020 9:07 am
by filbo
R'n'D writes .rocksndiamonds/cache/artworkinfo.cache on every single startup! Even if there are no changes at all (which is usually the case).

This probably isn't great for performance; moreso, flash devices don't like extra write burden.

Re: excessive cache writing

Posted: Thu Feb 04, 2021 12:11 am
by Holger
Thanks for pointing me towards this issue. (And sorry for the late reply.)

There were two reasons for this behaviour:

1. It was not checked at all if the cache had to be updated or not, it was just always written after initializing artwork info.

2. There was an additional issue with non-existing artwork info config files invalidating artwork info cache entries (which is legal behaviour, for example, when just placing some graphics or sounds with the same file name as the original default files into the "graphics" or "sounds" directory to replace the default artwork, but without having a corresponding "graphincsinfo.conf" or "soundsinfo.conf" file containing explicit definitions for the replacement).

Both issues are fixed now, so no new cache file is written anymore if nothing has changed.