Skip to content

Life 15 speed: one engine step a frame, cheaper choices, lighter view [LIFE15-Speed-067] - #88

Merged
NeoLorenzo merged 1 commit into
mainfrom
life15-speed
Oct 27, 2026
Merged

NeoLorenzo merged 1 commit into
mainfrom
life15-speed

Conversation

@NeoLorenzo

Copy link
Copy Markdown
Owner

Speed work toward running Life at 1 month/s smoothly. No run changes: all fingerprints are unchanged.

Engine

  • Each frame runs one engine step that checks its 40 ms budget between wake-ups, replacing many 15-minute steps that each copied the whole valley (about 48 copies a frame at 1 month/s).
  • Copies share each person's traits, rates and thirst thresholds, which never change, so personConfig's cache stays warm.
  • Wood choice prunes places no nearer than the best before the reachability test; a person's own piece of known ground is found once per choice.
  • The ground under a whole-centimetre point is cached.

View

  • Known-ground shading finds the triangle under each map cell once per valley (about 75 ms → under 2 ms a redraw).
  • Place rings are draped on the ground once, not at every overlay redraw.
  • At map speeds the panels refresh twice a second, and the history charts redraw only when a day ends, the followed forager changes or a run starts.

Measured

  • Engine, day 30 of forty founders run as the view runs it: about 300 ms a day instead of about 560 ms.
  • Off-screen production page at 1 month/s past day 35: 15.6 frames and 2.4 days a second, up from 8.5 and 1.3.
  • Days 11 to 17 remain slow (1–4 s a day) because of route-search fallbacks. Fixing that changes routes and needs a spec.

Validation

npm run agent:check passes (lint, typecheck, all tests including fingerprints, build).

@NeoLorenzo
NeoLorenzo merged commit c7cd840 into main Oct 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant