Commit graph

5 commits

Author SHA1 Message Date
Kamron Batman
319dcacba7
feat: anchored-time infrastructure with a save-start anchor in idx v5
WriteAnchoredTime stores the absolute value; ReadAnchoredTime re-bases it
by the elapsed time since the loaded save started, so downtime does not
age it and an unchanged value serializes to identical bytes. Min/MaxValue
pass through unshifted and shifts saturate instead of overflowing. The
shift rides the reader instance, so parallel per-persistence loads and
single-file restores each see their own file's anchor.

World.SaveStartTime is stamped the moment the world freezes for a
snapshot - one anchor for the whole save - and written into the idx v5
header. Loading an idx v5 computes the shift and applies it to that
persistence's bin readers; v4 and older carry no anchor and read with a
zero shift, which existing hand-written-header tests already pin.

Nothing serializes anchored values yet; field conversions follow
separately. Covered by unit round-trip tests and an end-to-end
persistence test that re-bases across a simulated two-hour downtime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-22 15:54:59 -07:00
Kamron Batman
e1e1a7c640
fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
Kamron Batman
4beda6a29d
fix: Eliminate intermediate string in typecache (#2176) 2025-05-06 21:04:54 -07:00
Derek Gooding
4b3b2839c6
chore(docs): Adds UnmanagedDataReader & BinaryFileReader documentation (#1968) 2024-10-01 17:07:51 -07:00
Kamron Batman
8ec203f387
feat: Updates serialization to use MMF (considerable memory savings) (#1841)
### Summary
Updates the serialization strategy to use `MemoryMappedFile` instead of thick buffers. This has the benefit of being on-par with the current implementation (based on hardware/OS), however won't incur the double-memory issue.

> [!Important]
> **Developer Note**
> The `BinaryFileWriter` and `BinaryFileReader` has been removed in favor of `MemoryMapFileWriter` and `UnmanagedDataReader`
2024-06-23 10:51:20 -07:00