village-builder

VB-052: Indexes for children, spouses and holders

Status: done (2026-10-30, 3601184) Priority: 1 Size: M Arch: tooling Phase: implement Design ref: Vision and scope (up to about 1,000 pawns); Commands, time steps and views (Performance). Goal: childrenOf, siblingsOf, spouseOf, isHolder and holdingOf (src/sim/records.js) scan all pawns, unions or households on every call, and heirRanking ranks every other household for each one it ranks. On a populous medium map at seed 7 (818 pawns), the moving round takes 2.6 s and the meetings 1.6 s, on the page’s main thread, so the game freezes; it gets worse as the dead accumulate (about 5,000 records after 150 years). Behaviour must not change. Acceptance criteria: