seriesoftubes/src/game/80-simulation
Hugues 456062284f Faster days on big networks: look fiber customers up by link id
compute(), the daily mood check and new alien-wave/fiber-pair offers asked
S.links.find() or S.biz.filter() once per customer or per link. On a save
with 2,950 links and 18,000 customers (16,000 alien waves) that was ~150 ms
per compute, ~250 ms more per day, and ~650 ms when a wave offer spawned.

linkIds() and fiberUse() build the lookups in one pass; fiberOk, bizSf,
soldSlots, freeCh and pairFree take them optionally, and give the same
answers as before (first link with the id wins, sums in S.biz order).

Player save (202 POPs, 2,958 links, 17,967 customers), median of 15:
compute 323 -> 124 ms, dayTick 545 -> 133 ms, after 356 -> 149 ms.
Big-network fixture: unchanged. Routing results identical to main.
2026-10-27 12:26:10 +01:00
..
10-dijkstra.js Split the game page into partials under src/, assembled into one index.html at build 2026-10-27 10:05:56 +01:00
20-routescript.js Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00
30-compute.js Faster days on big networks: look fiber customers up by link id 2026-10-27 12:26:10 +01:00
40-billing.js Split the game page into partials under src/, assembled into one index.html at build 2026-10-27 10:05:56 +01:00
50-sanitize.js Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00
60-requirements.js Faster days on big networks: look fiber customers up by link id 2026-10-27 12:26:10 +01:00
70-customers-and-events.js Faster days on big networks: look fiber customers up by link id 2026-10-27 12:26:10 +01:00
80-geography-and-latency.js Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00
90-sites-and-service.js Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00