feat(mapbench): map-architecture baseline benchmark harness (PR 1 of #229) #230
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!230
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mapbench-harness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
First slice of the world-map migration (epic #229), on the agreed format-first, no-throwaway path. Before rewriting the map format, we need a reproducible measurement of the current dense-
string[,]/ whole-string architecture so we can (a) prove empirically where it hits a wall and (b) have a baseline the chunked format must beat. This PR adds that harness — it changes no format and no runtime behavior.tools/IsoMmo.MapBenchloads the real tile catalog, generates a deterministic synthetic map, and measures the actual load/edit/save pipeline exactly as the editor/server exercise it (parse text ->TileMap,TileMap->MapModel, a local brush stroke, the full-map clone every dirty render/save triggers, a fullWriteMap), then projects the numbers to the 13,344x9,984 = 133,226,496-cell target. Run it withjust bench.Key finding (this dev PC): a local 9x9 brush stroke is ~0 ms / 0 MB, but every dirty render clones the whole grid (~39.5 MiB at 2304x1728), and the target projects to multi-second monolithic
ReadMap/WriteMapstalls and ~3 GiB of retained managed heap (three dense ref grids in flight) — not viable, which is exactly what motivates the chunked format in PR 2+.Screenshots / recording
N/A — no visible surface (headless benchmark + a pure text generator). Per the epic #229 verification plan, screenshots begin at PR 3 (editor opening the 133M world).
How it was tested
IsoMmo.MapBench.Tests) for the deterministic generator: same-seed byte-identical output, requested dimensions, different-seed divergence, zero-density -> empty statics/elevation, default-density -> non-empty, round-trips through the realTextMapFormat.ReadMap, empty-legends throws.just benchruns end-to-end and prints the baseline table + projection (768x576 and 2304x1728 measured; 133M projected).just lint(CSharpier + analyzers) clean — S1215 is disabled only in the bench project (with a written reason: a benchmark must force GC to isolate per-phase allocation).dotnet testfully green (incl. the 7 new tests).DoD delta (beyond the base DoD + epic #229)
just bench), measuring load/edit/save at 768x576 and 2304x1728 and projecting to 133,226,496 cells.Checklist
just lintpasses (CSharpier + analyzers, zero warnings)just testis green