village-builder

VB-442: Rebuild only the farms that changed, not every farm, fence and pawn

Status: done (2026-11-22) Priority: 3 Size: M Design ref: none (the page’s drawing; src/page/settlement.js, buildFarms; src/page/animate.js, updateSettlement) Goal: buildFarms destroys and redraws the whole settlement layer (fields, fences, houses, herds, every pawn’s rig) whenever st.visualDirty is set or st.rigDirty holds a pawn. The simulation asks for that on about 85 steps a game year on populous tiny (255 of 34,560 steps in 3 years, seed 18): a field broken (71 sets), a meadow finished (49), a building raised (27), a plot’s or cottage’s step (27 each), scrub cleared (25), a birth (16), a death (10). At the uncapped speed that is several whole rebuilds a second of wall time, each some hundreds of sprites and about 80 Graphics, for a change to one farm or one pawn. Rebuild what the change touched: the farm, the fence or the rig. Acceptance criteria: