Local JSON persistence with low I/O and safe writes.
We use a local JSON file: guild-configs.json.
guild-configs.json
Primary goal: efficient I/O.
At minimum, store:
config[guildId].lastUserId
the current count (or next expected count)
Keep the object flat and small.
Avoid synchronous disk writes inside hot paths.
Batch or debounce writes when possible.
Write only when state changes.
Why: disk churn can spike CPU under constrained hosts.
Last updated 11 minutes ago