village-builder

VB-1554: Cost: the jobs line measured by part, and its largest part cut

Status: done (2026-11-23) Priority: 2 Size: M Design ref: design.md section 7, Opportunities (cached per holder: Agreed, 10 Nov); docs/cost.md (the ten rules); docs/review-agency.md, section 3; docs/review-jobs.md, sections 3 and 10 Goal: “Jobs refresh and matching” is 49 ms of 109 ms a game day at populous small, seed 7, two years (332 to 346 living), 45% of simulation time and the longest single call (refreshJobs, 59 ms); scaled linearly it is about 145 ms of the 200 ms budget at 1,000 living. Measure it by part before changing anything: the availability asks by kind (oppAsk; available of sim/kinds and its domains), the allotment (dayPair, dayTake), the routes begun by the commands the planner issues, the due-queue, the sweep. Then cut the largest part by the rule of docs/cost.md it breaks: if it is the asks, build the cache design.md agrees (a holder’s opportunities cached, rebuilt on its planning day and when its rights or stores change), by dirty marks the owners of rights and stores already raise where they exist. Standing duties (VB-1553) changes allot beside this task: keep out of allot unless the measure says it is the largest part. Acceptance criteria:

Notes (VB-1554)