Batch Mode
By default every Save triggers a full disk write. Batch mode accumulates all writes in memory
and flushes them in one operation — essential for bulk saves like tile maps or large inventories.
API
static void BeginBatch() static void EndBatch() Example
// Without batch: 500 disk writes = lag spike
for (int i = 0; i < 500; i++) Vault.Save($"tile_{i}", tiles[i]);
// With batch: 1 disk write
Vault.BeginBatch();
for (int i = 0; i < 500; i++) Vault.Save($"tile_{i}", tiles[i]);
Vault.EndBatch(); // single flush Batch mode is scoped to the drawer active at BeginBatch(). Don't call SetDrawer() between Begin and End.
Always use batch when saving more than ~5 keys in a loop. It turns a multi-second stall into milliseconds.