uwarp-space 2026-03-19
Pathfinding optimizations, memray profiling, readline helpers, and Wine lock fixes
262 files · 25,484+ · 7,183-

Pathfinding optimizations

3 files changed
  • pathfinding.py Bidirectional BFS implementation — 23x faster with 67% fewer allocations
  • trading.py Eliminated redundant BFS calls in find_trade_routes
  • _movement_helpers.py Optimized BFS frontier allocation and path reconstruction
  • Implemented bidirectional BFS — 23x faster, 67% fewer allocations streamline internal
    1 file
    • pathfinding.py
  • Added _EMPTY sentinel and buffer-swap in bfs_sectors_within to reduce allocation pressure streamline internal
    1 file
    • pathfinding.py
  • Eliminated redundant BFS calls in find_trade_routes streamline internal
    1 file
    • trading.py
  • Optimized BFS frontier allocation and path reconstruction streamline internal
    1 file
    • _movement_helpers.py

Worker and session optimizations

4 files changed
  • _wrapper_builders.py Eliminated double-allocation in wrapper builders
  • defaults.py Template-copy defaults and fast-path to_py_dict
  • _session_io.py Skipped colorize pipeline for plain text lines
  • globals.py Hoisted per-call dict literals to module constants
  • Eliminated double-allocation in wrapper builders streamline internal
    1 file
    • _wrapper_builders.py
  • Added template-copy defaults and fast-path to_py_dict streamline internal
    1 file
    • defaults.py
  • Skipped the colorize pipeline entirely for plain text lines streamline internal
    1 file
    • _session_io.py
  • Hoisted per-call dict literals to module constants; single-pass metrics collection streamline internal
    1 file
    • globals.py

Memray profiling infrastructure

6 files changed
  • memray_analysis.py Memory profiling benchmarking infrastructure
  • memray_worker_stress.py Worker stress test profiling for DO wrapper and transport
  • memray_pathfinding_stress.py Pathfinding stress test profiling
  • memray_trading_stress.py Trading stress test profiling
  • run_memray_stress.py Runner for memray stress test suite
  • README.md Comprehensive analysis, optimization guide, and executive summary
  • Implemented memory profiling benchmarking infrastructure instantiate internal
    2 files
    • memray_analysis.py
    • run_memray_stress.py
  • Added worker stress test profiling for the DO wrapper and transport qualify internal
    1 file
    • memray_worker_stress.py
  • Rewrote stress tests with real uwarp imports and production-scale hot paths qualify internal
    2 files
    • memray_engine_stress.py
    • memray_pathfinding_stress.py
  • Comprehensive analysis, optimization guide, and executive summary documentation specify internal
    4 files
    • README.md
    • MEMRAY_FINDINGS.md
    • MEMRAY_OPTIMIZATION_GUIDE.md
    • MEMRAY_SUMMARY.md

Readline helpers and char prompt type

3 files changed
  • ssh.py Added readline helpers (Ctrl+A, Ctrl+E, Ctrl+U, Ctrl+K)
  • prompt_handler.py Added char prompt type for single-keypress inputs without line buffer
  • test_prompt_handler.py Unit tests for PromptHandler type=char and type=yn
  • Added readline helpers to the terminal — Ctrl+A (start of line), Ctrl+E (end), Ctrl+U (kill before), Ctrl+K (kill after) instantiate internal
    1 file
    • ssh.py
  • Added char prompt type to the bridge for single-keypress inputs without a line buffer instantiate behavioral
    1 file
    • prompt_handler.py
  • Refactored terminal and session to use the generic LineEditor from undef-terminal decouple internal
    1 file
    • _session_io.py
  • Added local echo for immediate character feedback in the terminal instantiate internal
    1 file
    • terminal.js
  • Increased line input buffer limit from 40 to 80 characters margin internal
    1 file
    • terminal.js
  • Added backspace filtering to menu and prompt handlers harden behavioral
    1 file
    • menu_handler.py
  • Fixed backspace spam, seed errors, text wrapping, and DO warmup indicator remediate internal
    1 file
    • terminal.js

Response-time indicator spinner

2 files changed
  • terminal.js Comprehensive response-time indicator showing server processing state
  • test_response_time_indicator.py Tests for response-time indicator behavior
  • Added a comprehensive response-time indicator spinner that shows server processing state instantiate behavioral
    1 file
    • terminal.js
  • Spinner updates a single character in place; shows hibernation spinner only after a 500ms delay instantiate internal
    1 file
    • terminal.js

Personal settings sync from TWGS twuser.dat

2 files changed
  • _sync.py Syncs personal settings from TWGS twuser.dat during parity pre-flight
  • test_sync_personal_settings.py 100%-coverage tests for personal settings sync
  • During parity pre-flight, syncs personal settings from the TWGS twuser.dat file instantiate internal
    1 file
    • _sync.py
  • Added 100%-coverage tests for the personal settings sync qualify internal
    1 file
    • test_sync_personal_settings.py

Character generation state machine recovery

1 file changed
  • _ts_creation.py Detected and recovered from state machine corruption during DO hibernation in character creation flow
  • Detected and recovered from state machine corruption during DO hibernation in character creation flow harden internal
    1 file
    • _ts_creation.py

Wine subproject fixes

1 file changed
  • wine Wine submodule — NtLockFile/NtUnlockFile FIXME stubs, OEM_CHARSET fixes, locktest expansion
  • Fixed NtLockFile/NtUnlockFile FIXME stubs (io_status, key, APC, async handling) remediate internal
    1 file
    • wine
  • Fixed OEM_CHARSET early init (fallback to CP437) and font matching remediate architectural
    1 file
    • wine
  • Expanded lockstress multi-threaded lock contention test; expanded locktest to 53 checks qualify internal
    1 file
    • wine
  • Updated BUILDING.md (freetype required, not optional) specify internal
    1 file
    • wine

Parity fixes

3 files changed
  • _sync.py Synced auto_flee in pre-flight; cleaned beacon before deploy test
  • _recovery.py Recovered from line-input prompts in corp/underground/fighter deploy
  • test_haggle_initial_offer.py Pinned haggle initial offer formula with unit tests
  • Synced auto_flee in pre-flight; cleaned beacon before deploy test qualify internal
    2 files
    • _sync.py
    • _tests_beacon.py
  • Recovered from line-input prompts in corp/underground/fighter deploy harden internal
    1 file
    • _recovery.py
  • Pinned haggle initial offer formula with unit tests qualify internal
    1 file
    • test_haggle_initial_offer.py