Cache object for settings
KameiB opened this issue ยท 1 comments
In order to reduce some CPU & disk load when trying to generate dungeons.
Everytime a dungeon tries to generate, RLD parses all the settings files in case they were modified on the fly.
But since this is a very unfrequent scenario, I suggest this:
- Parse all json settings files when loading a world, and when running /roguelike settings (list/reload).
- Save the parsed data and each file's Modification date and time, inside this cache object.
- When trying to generate a dungeon, check:
- if current settings json file's modified date and time equals the cache timestamp, skip this parsing.
- else, parse this json file and update its corresponding portion of the cache object.
- continue with generation.
The goal is to take all dungeon generation settings from RAM instead of the disk. I hope it makes sense.
This was fixed in 5a7988a I think