Roguelike Dungeons -- Fnar's Edition

Roguelike Dungeons -- Fnar's Edition

13M Downloads

Cache object for settings

KameiB opened this issue ยท 1 comments

commented

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:

  1. Parse all json settings files when loading a world, and when running /roguelike settings (list/reload).
  2. Save the parsed data and each file's Modification date and time, inside this cache object.
  3. 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.

commented

This was fixed in 5a7988a I think