Open AJMansfield opened 8 years ago
It already does. It loads the cache if-and-only-if the configuration is exactly the same as before (i.e. nothing added or removed).
This doesn't always happen for me, even when I don't tinker with my mod install. I think that there are some mods whose settings are stored in the ConfigNode format, which means that any changes there (e.g. moving a window) would cause MM to discard the cache and start from scratch.
There are some CFG files in my install with settings... c:\Kerbal Space Program 1.0.5\GameData\000_FilterExtensions\Settings.cfg c:\Kerbal Space Program 1.0.5\GameData\HaystackContinued\settings.cfg c:\Kerbal Space Program 1.0.5\GameData\Kerbaltek\HyperEdit_1.4.2\hyperedit.cfg c:\Kerbal Space Program 1.0.5\GameData\KerboKatz\PluginData\keybindingSettings.cfg c:\Kerbal Space Program 1.0.5\GameData\KerboKatz\SmallUtilities\FPSViewer\PluginData \FPSViewerSettings.cfg c:\Kerbal Space Program 1.0.5\GameData\PartWizard\partwizard.cfg c:\Kerbal Space Program 1.0.5\GameData\REPOSoftTech\AmpYear\Plugins\Config.cfg c:\Kerbal Space Program 1.0.5\GameData\REPOSoftTech\DeepFreeze\Plugins\Config.cfg c:\Kerbal Space Program 1.0.5\GameData\WaypointManager\WaypointManager.cfg
One solution can be a ignore list for MM.
Would it be possible for modmanager to track which files change frequently, and then cache a partially-patched set of files that include only patches from files that don't change?
For instance, make
keeps track of build dependencies to let it only rebuilds files that depend on files that have changed since the last build. Perhaps ModuleManager could use a system more like that to keep track of the cache?
Because if it has to do a complete rebuild of everything whenever any settings change, the current caching is nearly useless for heavily-modded installs.
The problem is that real MM cfg can influence each other. Most of the changing cfg files are setting files from mods with no MM relevance at all. So the best solution is to put these known setting cfg`s into a blacklist file and ignore them altogether.
2.6.17 will log the file that changed and invalidate the cache. Once I know a bit more about the mods that create those cfg I will see what I will do. A blacklist seems like the obvious solution but :
Edit : mod that use cfg for config saving should put them into a PluginData subdirectory where they are not loaded by the game.
If I look into the files that have changed in my GameData (96 Mods) and delete all entry's with PluginData folder this list comes up:
GameData\000_FilterExtensions\Settings.cfg GameData\Diazo\AGExt\AGExt.cfg GameData\Diazo\ModActions\ModActions.cfg GameData\HaystackContinued\settings.cfg GameData\PartWizard\partwizard.cfg GameData\Pilot Assistant\Presets.cfg GameData\RCSBuildAid\settings.cfg GameData\REPOSoftTech\AmpYear\Plugins\Config.cfg GameData\REPOSoftTech\DeepFreeze\Plugins\Config.cfg GameData\WaypointManager\WaypointManager.cfg
So we have the following options:
no backlist, if a cfg doesn`t change your cache files
ModuleManager.ConfigCache
ModuleManager.Physics
ModuleManager.TechTree
do not include it into
ModuleManager.ConfigSHA
All those are reported in MM log or you checked the file date ?
I checked the last modified date and excluded all real MM cfg`s. Where is the MM log located?
It's inside the main log -- all of the lines that start with [ModuleManager].
The cache is working to my knowledge. There are still some mods that store their settings in a bad location and break it, but those just have to be dealt with one by one (by asking the author to move the settings). Do we still need this issue?
Is there a possibility to get an in game list/display of the changed cfg files? Something better than going threw the log manually every time?
That list could potentially be quite long if you actually added or removed a mod.
It think only list changed cfg files is ok. Not new or deleted ones.
When launching KSP with modded installs, ModuleManager can frequently take a significant amount of time to patch all of the configurations that need patching. If ModuleManager could be modified to cache the patched files, this could help speed up loading times.