aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


commit 654c84774b5c9d636034f7e886f2a2a0165ae2cd
parent bcbcec0fe1664c8e5ac708c03c04359e3f0062ff
Author: anon <anon@example.com>
Date:   Sat,  7 Nov 2026 03:24:55 +0000

Record 500-client latency and CPU comparison with the pre-refactor server

Diffstat:
MTODO.md | 61-------------------------------------------------------------
Mtools/stress/README.md | 1+
2 files changed, 1 insertion(+), 61 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -42,67 +42,6 @@ research separately. More screenshots and test cases do not count as new gamepla Authenticated HTTP requests measured 1.1-3.3 ms with the native client running, and a regression confirms the response completes while the simulation is locked. -- [ ] **Isolate long simulation critical sections during phone play.** November 6: - local unauthenticated account requests waited 1.1-5.6 seconds on the simulation - mutex while static HTTPS responses took 2-8 ms; the server used about one CPU - core. Restart removed the long stalls, and a 20-second CPU/mutex profile of the - idle server did not isolate the previous long holder. Reopen profiling when an - active-play stall reproduces; preserve gameplay and persistence cadence. - Path searches now run on snapshot workers per zone; nearby NPC queries use - spatial cells, and periodic checkpoints avoid full inventory reconstruction - and dormant snapshot copies. Slow-lock and loop timings distinguish contention, - lock hold time and scheduling delay. The original stall is still unattributed, - and ordinary state mutations still share the global lock. Unworn item moves - now use isolated SQLite placement transactions with source/owner checks and - no world inventory reconstruction or NPC checkpoints. Their callers still - hold the lock while waiting; transaction completion must be coordinated with - the remaining snapshot-based writers before releasing it. The remaining - migration includes zone ownership, command dispatch, cross-zone transfers - and transaction completion. Detached write requests now run through one SQLite - writer goroutine; inventory, checkpoints, combat, lifecycle, team and creation - results publish only after its reply. Blocked-write regressions verify that - later live-state changes cannot alter queued values and stale placements roll - back related credits. Callers still hold simulation locks; the independent-zone - movement acceptance criterion remains open. A zone-owner component passes this - isolation check with separate owned states, including under the race detector; - production session routing and cross-zone handoffs are not connected yet. - World transport now dispatches through a session owner, with admission, durable - inventory delivery and disconnect tested through a zone's command channel. - Shared item/NPC reservations prevent duplicate allocation; retries may leave - unused IDs. Pet membership carries identities rather than cross-zone entity - pointers, and resource pickup validates only its own depletion changes. - The routing component now transfers committed teleports and Arrival Hall exits - through destination command channels, retaining source-bound old sessions and - waiting for arrival on reconnect. Its checks cover failed commits, inventory - ownership, simultaneous opposite transfers, admission races, unrelated routing - during a blocked arrival, and draining handoffs during shutdown. Production - startup, cross-zone social/mission operations and shutdown checkpoints remain - unfinished; the global lock has not been removed. Pet dismissal and expiry now - send ordered ownership messages across zones after durable deletion, including - when the player moves again before notification. Their component tests cover - failed deletion/retry and draining notifications during shutdown. Mission - retirement now uses that pet boundary and transfers evacuated players to their - destination owners after the atomic retirement; shared mission coordination - and credentials held in other zones still need ownership migration. Team roster, - leadership and loot policy now belong to per-team channel owners, with durable - revisions and immutable zone views. Cross-zone roster actions and value-only - presence are covered by component regressions; see [team ownership](docs/team-ownership.md). - Chat sessions, buddy lists and channel membership now have a separate owner. - Cross-zone chat works while zone owners are busy; a blocked history write does - not block movement or metadata publication. Vicinity selects local recipients - in the zone, then waits for chat outside it. Mission lifecycle, production - routing and final checkpoint coordination remain open; this gate is not closed. - Player checkpoints now batch due actors into one transaction; nonfatal periodic - damage/healing waits for checkpoints. Living authored NPCs restart at home, - retaining checkpointed health, contributions and effects without roaming writes. - A 20-client protocol run reproduced a 2.5-second initial population checkpoint - blocking all zones. Initialization now completes that write before listeners - admit traffic; the same run had no missed actions afterward. This identifies - a startup stall, not the still-unattributed original phone-session stall. - Periodic player/NPC batches now enter a bounded writer queue under ownership - and await SQLite outside the global lock. Blocked-write regressions verify - responsive game actions and preserve newer durable updates and saved bases. - - [x] **Use the original native character creation flow.** Login credentials are collected in a compact modal with password confirmation at native naming, with native controls blocked until OK diff --git a/tools/stress/README.md b/tools/stress/README.md @@ -56,3 +56,4 @@ Keep assets, scenario, hardware, durations and persistence settings fixed. Repea runs, compare admission separately from steady load, and retain failures and missed actions. Current production still uses shared simulation locks, so a speedup at this point cannot be attributed to a completed zone-owner migration. +