Remember each used customer name once
S.usedNames only answers "was this name used?", but every offer pushed its name again, also once all names were taken: a 5,500-day save holds 560,345 entries for 129 names, 11.8 of its 22.4 million characters. Names are now added once (useName), and sanitize() drops duplicates from older saves. Player save, 30 days from load, against main: routing and the whole state except usedNames identical, usedNames identical as a set; save 22.4 -> 10.6 million characters, first save in Firefox 95 -> 55 ms, JSON.stringify 68 -> 42 ms. Still over Firefox's quota on this save.
This commit is contained in:
parent
d7301747f7
commit
22817c83c5
7 changed files with 19 additions and 5 deletions
|
|
@ -7,6 +7,7 @@ All notable changes to this project are documented here. The project follows
|
|||
## [Unreleased]
|
||||
|
||||
- Huge networks stop stuttering every few seconds when their save is too big for the browser to keep: after a failed save the game waits a minute before trying again, then longer, instead of retrying every 5 seconds and after every click. Leaving the page, exporting and new games still save at once.
|
||||
- Saves of long games are much smaller: the list of customer names already used kept growing by the same names every day (half of a late-game save). Older saves shrink when loaded.
|
||||
- The map of a huge network spends less time working out fiber capacities on every frame, and skips links above or below the screen.
|
||||
|
||||
## [1.34.1] — 2026-10-27
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue