Skip to content

Optimize visual runtime and add upstream A/B validation#4

Merged
Arbousier1 merged 17 commits into
masterfrom
codex/upstream-runtime-comparison
Jul 16, 2026
Merged

Optimize visual runtime and add upstream A/B validation#4
Arbousier1 merged 17 commits into
masterfrom
codex/upstream-runtime-comparison

Conversation

@TypeThe0ry

@TypeThe0ry TypeThe0ry commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary - optimize the production rewrite fixed at c28db0146ec2f35eaf066b4202b33f08d06bbc4b - reduce dropped-item visibility queue churn, bound text parsing caches, avoid empty drains, and clear retained manager/cache state on shutdown - remove avoidable block-state snapshots in furnace/beehive paths and tighten tile-entity lifecycle/index cleanup - preserve preference save/load ordering across quit/rejoin and plugin shutdown - add reproducible official-upstream vs rewrite runtime comparison with one prepare/download/build job and locally distributed, hash-verified artifacts - run independent restart-isolated samples in parallel; no fake cross-runner A/B pairing ## Correctness review No merge-blocking correctness issue remains in the fixed production candidate. Runtime optimization flags retain conservative production defaults; the benchmark requests them only in its controlled profile. ## GitHub validation All checks on fbcd0d569a65e3e46b161cd62151e79091e894e1 are green: - Java 25 build/test - A-B Performance Benchmark - Phase 2 Packet Capture A-B - Phase 2 Runtime A-B - Upstream Runtime Comparison smoke (12/12 jobs) - formal upstream runtime comparison (24/24 samples plus both aggregates and global gate) Formal run: https://github.com/EllanServer/InteractionVisualizer/actions/runs/29525891826 ## Formal stable-regime results Paper 26.1.2-74, 4 GiB symmetric heap, 20 TPS target, one protocol observer, 60 s warmup + 20 s settle + 120 s measurement. Each scenario has 12 independent restart-isolated samples (official A = 6, rewrite B = 6). | Scenario | Metric | Official median | Rewrite median | Median B/A | Bootstrap 95% CI | |---|---|---:|---:|---:|---:| | 512 dropped items | mean MSPT | 3.397374 ms | 2.460815 ms | 0.724329 | [0.545511, 0.918597] | | 512 dropped items | P95 MSPT | 30.005560 ms | 14.885620 ms | 0.496095 | [0.236532, 1.035402] | | 512 dropped items | P99 MSPT | 52.528233 ms | 17.202398 ms | 0.327489 | [0.242151, 0.440776] | | 256 active blocks | mean MSPT | 3.818482 ms | 0.941192 ms | 0.246483 | [0.212393, 0.283162] | | 256 active blocks | P95 MSPT | 4.495410 ms | 1.317267 ms | 0.293025 | [0.266592, 0.329043] | | 256 active blocks | P99 MSPT | 5.240943 ms | 1.567224 ms | 0.299035 | [0.262858, 0.354392] | Both scenarios pass the registered improvement and non-regression gates. A and B remain near 20 TPS, every formal sample keeps the observer online, and all 24 server processes exit cleanly. Global verdict: rewrite-better-across-both-scenarios. ## Stress evidence At 4 GiB with 1024 active blocks, official upstream A lost the observer to keepalive/packet-flood pressure in 6/6 runs; rewrite B completed 6/6. The failed upstream MSPT is not mixed into the stable CPU statistics because observer loss would underestimate its work. Stress run: https://github.com/EllanServer/InteractionVisualizer/actions/runs/29524047760 An earlier 2 GiB feasibility run also produced official-upstream OutOfMemoryError: Java heap space, while rewrite samples completed. Treat this as stability/memory evidence, not a retained-heap curve. ## Benchmark policy - build and download dependencies exactly once per campaign - distribute one internal tar artifact to measurement runners and verify the tar plus critical-file hashes - preserve the normal 20 TPS target - isolate server and protocol client CPU sets - use independent-sample bootstrap for parallel runners - require artifact/config/JVM/CPU/scenario/runtime-flag/TPS/observer/shutdown provenance before aggregation ## Caveat This is a synthetic single-observer GitHub-runner comparison, not a long multi-player production soak. A 30–60 minute multi-player retained-heap/JFR run remains a useful post-merge follow-up, but it is not a blocker for this PR.

@TypeThe0ry TypeThe0ry changed the title Add upstream runtime MSPT/TPS comparison Optimize visual runtime and add upstream A/B validation Jul 16, 2026
@TypeThe0ry
TypeThe0ry marked this pull request as ready for review July 16, 2026 19:15
@Arbousier1
Arbousier1 merged commit ad3e59b into master Jul 16, 2026
44 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.

2 participants