From 06ec15f3a00ca5135874eb5cc1bc79ba12f84905 Mon Sep 17 00:00:00 2001 From: rdbtCVS <87152661+rdbtCVS@users.noreply.github.com> Date: Sat, 24 Oct 2026 14:50:55 +0100 Subject: [PATCH] Retire the legacy Java optimization mod and performance packs Preserve Java parity oracles and comparison benchmark instrumentation. Move their remaining dependency locks under tools/benchmark-deps and remove legacy product packaging, fixtures, and CI checks. Co-Authored-By: OpenAI Codex gpt-6.1-sol --- .github/workflows/ci.yml | 96 +--- .../server-four-way-2026-10-19/README.md | 4 +- docs/README.md | 2 +- docs/architecture.md | 2 +- docs/benchmark.md | 2 +- docs/collectors.md | 48 -- docs/java-packs.md | 118 +---- docs/performance/java-perf-mods.md | 2 +- docs/process-memory.md | 53 --- docs/profiling.md | 16 +- docs/research/java-mod-compat.md | 7 +- docs/server.md | 2 +- docs/tick-state.md | 26 - docs/vulkan.md | 32 -- .../main/java/dev/horizonlab/HorizonLab.java | 78 --- .../dev/horizonlab/budget/DebounceWait.java | 14 - .../dev/horizonlab/budget/DispatchRetry.java | 14 - .../dev/horizonlab/budget/TerrainBudget.java | 38 -- .../horizonlab/budget/TerrainReadWait.java | 27 -- .../horizonlab/budget/WakeableIdleWait.java | 15 - .../dev/horizonlab/budget/WorkerPacer.java | 36 -- .../client/DistantTerrainBudget.java | 74 --- .../client/DistantTerrainSettings.java | 46 -- .../dev/horizonlab/client/HorizonClient.java | 212 --------- .../dev/horizonlab/client/ShaderSettings.java | 28 -- .../geometry/RelativeTerrainPosition.java | 30 -- .../metrics/ProcessMemoryMonitor.java | 53 --- .../dev/horizonlab/metrics/Recording.java | 159 ------- .../java/dev/horizonlab/metrics/Reports.java | 43 -- .../horizonlab/metrics/ResidentMemory.java | 20 - .../dev/horizonlab/metrics/SampleStats.java | 36 -- .../dev/horizonlab/metrics/ServerContext.java | 27 -- .../horizonlab/metrics/SoftwareContext.java | 21 - .../dev/horizonlab/metrics/TickState.java | 76 --- .../mixin/CullingEmptyWhitelistMixin.java | 19 - .../mixin/CullingRayScratchMixin.java | 28 -- .../horizonlab/mixin/DhDebounceWaitMixin.java | 77 --- .../mixin/DhPriorityDispatchMixin.java | 76 --- .../horizonlab/mixin/DhQuadReuseMixin.java | 31 -- .../mixin/DhRelativePositionMixin.java | 16 - .../mixin/DhTerrainReadWaitMixin.java | 18 - .../horizonlab/mixin/DhTickDedupMixin.java | 30 -- .../horizonlab/mixin/DhWorkerPacingMixin.java | 42 -- .../java/dev/horizonlab/mixin/FrameMixin.java | 16 - .../horizonlab/mixin/HorizonMixinPlugin.java | 193 -------- .../dev/horizonlab/mixin/ServerTickMixin.java | 25 - .../assets/horizonlab/lang/en_us.json | 3 - .../src/main/resources/fabric.mod.json | 29 -- .../src/main/resources/horizonlab.mixins.json | 24 - .../budget/DebounceQueueBenchmark.java | 50 -- .../horizonlab/budget/DebounceWaitTest.java | 30 -- .../horizonlab/budget/DispatchRetryTest.java | 23 - .../horizonlab/budget/IdleQueueBenchmark.java | 63 --- .../horizonlab/budget/TerrainBudgetTest.java | 30 -- .../budget/WakeableIdleWaitTest.java | 70 --- .../horizonlab/budget/WorkerPacerTest.java | 48 -- .../budget/WorkerPacingBenchmark.java | 64 --- .../client/DistantTerrainBudgetTest.java | 56 --- .../client/DistantTerrainSettingsTest.java | 59 --- .../dispatch/CullingEmptyIntegration.java | 100 ---- .../dispatch/CullingRayIntegration.java | 148 ------ .../dispatch/DispatchIntegration.java | 108 ----- .../dispatch/PositionIntegration.java | 121 ----- .../dispatch/QuadReuseIntegration.java | 99 ---- .../dispatch/QuadSizeIntegration.java | 31 -- .../dispatch/TerrainReadIntegration.java | 155 ------ .../dispatch/TickDedupIntegration.java | 87 ---- .../dispatch/fixture/CullingRayAccess.java | 16 - .../fixture/GraphicsBackendTraceMixin.java | 58 --- .../geometry/RelativeTerrainPositionTest.java | 52 -- .../metrics/ClientGraphicsIntegration.java | 155 ------ .../dev/horizonlab/metrics/MetricsTest.java | 102 ---- .../metrics/ObjectHeaderBenchmark.java | 59 --- .../horizonlab/metrics/ObjectSizeAgent.java | 7 - .../metrics/ResidentMemoryTest.java | 59 --- .../metrics/ServerGraphicsIntegration.java | 69 --- .../metrics/TickStateIntegration.java | 70 --- packs/Mac-Start.command | 32 -- packs/START-HERE.txt | 195 -------- packs/config/cinematic.toml | 18 - packs/config/far-distance.toml | 17 - packs/config/m2-balanced.toml | 18 - packs/config/vulkan.toml | 18 - packs/mods.lock.json | 323 ------------- tests/test_fixtures.py | 119 ----- tests/test_packs.py | 447 ------------------ tests/test_runtime.py | 48 ++ tools/Compare-Benchmarks.html | 299 ------------ tools/benchmark-deps/README.md | 10 + .../benchmark-deps}/fabric.lock.json | 0 tools/benchmark-deps/mods.lock.json | 134 ++++++ tools/build_mod.py | 268 ----------- tools/build_pack.py | 192 -------- tools/build_release.py | 42 -- tools/compare_benchmarks.py | 195 -------- tools/perf_bench.py | 8 +- tools/runtime.py | 103 +--- tools/server_bench.py | 8 +- tools/test_client_graphics.py | 198 -------- tools/test_culling_empty.py | 69 --- tools/test_culling_rays.py | 105 ---- tools/test_dispatch.py | 87 ---- tools/test_quad_reuse.py | 77 --- tools/test_quad_sizes.py | 99 ---- tools/test_server_graphics.py | 75 --- tools/test_terrain_position.py | 77 --- tools/test_terrain_read.py | 71 --- tools/test_tick_dedup.py | 68 --- 108 files changed, 232 insertions(+), 7261 deletions(-) delete mode 100644 docs/collectors.md delete mode 100644 docs/process-memory.md delete mode 100644 docs/tick-state.md delete mode 100644 docs/vulkan.md delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/HorizonLab.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/budget/DebounceWait.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/budget/DispatchRetry.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/budget/TerrainBudget.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/budget/TerrainReadWait.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/budget/WakeableIdleWait.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/budget/WorkerPacer.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/client/DistantTerrainBudget.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/client/DistantTerrainSettings.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/client/HorizonClient.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/client/ShaderSettings.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/geometry/RelativeTerrainPosition.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/metrics/ProcessMemoryMonitor.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/metrics/Recording.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/metrics/Reports.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/metrics/ResidentMemory.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/metrics/SampleStats.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/metrics/ServerContext.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/metrics/SoftwareContext.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/metrics/TickState.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/CullingEmptyWhitelistMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/CullingRayScratchMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/DhDebounceWaitMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/DhPriorityDispatchMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/DhQuadReuseMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/DhRelativePositionMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/DhTerrainReadWaitMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/DhTickDedupMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/DhWorkerPacingMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/FrameMixin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/HorizonMixinPlugin.java delete mode 100644 mods/horizon/src/main/java/dev/horizonlab/mixin/ServerTickMixin.java delete mode 100644 mods/horizon/src/main/resources/assets/horizonlab/lang/en_us.json delete mode 100644 mods/horizon/src/main/resources/fabric.mod.json delete mode 100644 mods/horizon/src/main/resources/horizonlab.mixins.json delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/budget/DebounceQueueBenchmark.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/budget/DebounceWaitTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/budget/DispatchRetryTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/budget/IdleQueueBenchmark.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/budget/TerrainBudgetTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/budget/WakeableIdleWaitTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/budget/WorkerPacerTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/budget/WorkerPacingBenchmark.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/client/DistantTerrainBudgetTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/client/DistantTerrainSettingsTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/CullingEmptyIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/CullingRayIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/DispatchIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/PositionIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/QuadReuseIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/QuadSizeIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/TerrainReadIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/TickDedupIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/fixture/CullingRayAccess.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/dispatch/fixture/GraphicsBackendTraceMixin.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/geometry/RelativeTerrainPositionTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/metrics/ClientGraphicsIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/metrics/MetricsTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/metrics/ObjectHeaderBenchmark.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/metrics/ObjectSizeAgent.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/metrics/ResidentMemoryTest.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/metrics/ServerGraphicsIntegration.java delete mode 100644 mods/horizon/src/test/java/dev/horizonlab/metrics/TickStateIntegration.java delete mode 100644 packs/Mac-Start.command delete mode 100644 packs/START-HERE.txt delete mode 100644 packs/config/cinematic.toml delete mode 100644 packs/config/far-distance.toml delete mode 100644 packs/config/m2-balanced.toml delete mode 100644 packs/config/vulkan.toml delete mode 100644 packs/mods.lock.json delete mode 100644 tests/test_fixtures.py delete mode 100644 tests/test_packs.py create mode 100644 tests/test_runtime.py delete mode 100644 tools/Compare-Benchmarks.html create mode 100644 tools/benchmark-deps/README.md rename {packs => tools/benchmark-deps}/fabric.lock.json (100%) create mode 100644 tools/benchmark-deps/mods.lock.json delete mode 100644 tools/build_mod.py delete mode 100644 tools/build_pack.py delete mode 100644 tools/build_release.py delete mode 100644 tools/compare_benchmarks.py delete mode 100644 tools/test_client_graphics.py delete mode 100644 tools/test_culling_empty.py delete mode 100644 tools/test_culling_rays.py delete mode 100644 tools/test_dispatch.py delete mode 100644 tools/test_quad_reuse.py delete mode 100644 tools/test_quad_sizes.py delete mode 100644 tools/test_server_graphics.py delete mode 100644 tools/test_terrain_position.py delete mode 100644 tools/test_terrain_read.py delete mode 100644 tools/test_tick_dedup.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dfd43300f..98d5b9093e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -430,7 +430,7 @@ jobs: env: RUSTUP_TOOLCHAIN: stable run: python tools/test_float_log_parity.py - portable-mod: + jfr-analysis: if: github.event_name == 'workflow_dispatch' runs-on: [self-hosted, linux, horizon-game] steps: @@ -442,101 +442,7 @@ jobs: with: distribution: temurin java-version: '25' - - name: Compile original mod and test metrics - run: python tools/build_mod.py - name: Verify streaming JFR analysis against the JDK exporter run: python tools/test_jfr.py - name: Verify ZGC pause and allocation event interpretation run: python tools/test_jfr.py --gc zgc - - name: Build pinned portable packs - run: python tools/build_pack.py - - name: Measure isolated worker pacing on this platform - run: python -c "from tools.build_mod import benchmark_workers; benchmark_workers()" - - name: Measure isolated debounce queue polling - run: python -c "from tools.build_mod import benchmark_debounce; benchmark_debounce()" - - name: Measure wakeable idle queue latency - run: python -c "from tools.build_mod import benchmark_idle; benchmark_idle()" - - name: Measure object allocations with compact headers off and on - run: python -c "from tools.build_mod import benchmark_headers; benchmark_headers()" - - name: Test pack integrity and comparisons - run: python -m unittest discover -s tests -v - - name: Start recommended OpenGL macOS clients and verify framebuffer readback - if: runner.os == 'macOS' - run: | - python tools/test_client_graphics.py --native-display - cp dist/client-graphics-smoke.json dist/client-graphics-macos-title.json - python tools/test_client_graphics.py --native-display --world - cp dist/client-graphics-smoke.json dist/client-graphics-macos-world.json - - name: Compile the private dispatch fixture - run: python -c "from tools.build_mod import build_dispatch_fixture; build_dispatch_fixture()" - - name: Compile the private integrated-server graphics fixture - run: python -c "from tools.build_mod import build_integration_fixture; build_integration_fixture('server-graphics', 'dev.horizonlab.metrics.ServerGraphicsIntegration', fixture_dependencies={})" - - name: Compile the private tick-manager state fixture - run: python -c "from tools.build_mod import build_integration_fixture; build_integration_fixture('tick-state', 'dev.horizonlab.metrics.TickStateIntegration')" - - name: Compile the private terrain tick membership fixture - run: python -c "from tools.build_mod import build_tick_dedup_fixture; build_tick_dedup_fixture()" - - name: Compile the private culling whitelist fixture - run: python -c "from tools.build_mod import build_culling_empty_fixture; build_culling_empty_fixture()" - - name: Compile the private culling ray geometry fixture - run: python -c "from tools.build_mod import build_integration_fixture; build_integration_fixture('culling-rays', 'dev.horizonlab.dispatch.CullingRayIntegration', ['entityculling'], ['CullingRayAccess'])" - - name: Compile the private terrain position lookup fixture - run: python -c "from tools.build_mod import build_integration_fixture; build_integration_fixture('terrain-position', 'dev.horizonlab.dispatch.PositionIntegration')" - - name: Compile the private terrain quad reuse fixture - run: python -c "from tools.build_mod import build_integration_fixture; build_integration_fixture('quad-reuse', 'dev.horizonlab.dispatch.QuadReuseIntegration')" - - name: Compile the private object-size agent and terrain quad fixture - run: python -c "from tools.test_quad_sizes import build_agent; from tools.build_mod import build_integration_fixture; build_agent(); build_integration_fixture('quad-size', 'dev.horizonlab.dispatch.QuadSizeIntegration')" - - name: Compile the private terrain read shutdown fixture - run: python -c "from tools.build_mod import build_integration_fixture; build_integration_fixture('terrain-read', 'dev.horizonlab.dispatch.TerrainReadIntegration')" - - name: Install headless graphics libraries for applied-hook checks - if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get install -y xvfb libgl1 libegl1 libvulkan1 mesa-vulkan-drivers libasound2t64 libxkbcommon0 - - name: Verify integrated-server graphics report against the actual device - run: python tools/test_server_graphics.py ${{ runner.os == 'macOS' && '--native-display' || '' }} - - name: Exercise the applied dispatcher hooks and upstream rejection path - if: runner.os == 'Linux' - run: python tools/test_dispatch.py - - name: Verify applied tick membership transitions and allocation - if: runner.os == 'Linux' - run: python tools/test_tick_dedup.py - - name: Verify live culling whitelist registration and empty iteration - if: runner.os == 'Linux' - run: python tools/test_culling_empty.py - - name: Compare applied culling ray geometry and provider queries - if: runner.os == 'Linux' - run: python tools/test_culling_rays.py - - name: Verify actual full-data position lookup equivalence - if: runner.os == 'Linux' - run: python tools/test_terrain_position.py - - name: Verify actual terrain quad geometry and allocation - if: runner.os == 'Linux' - run: python tools/test_quad_reuse.py - - name: Measure actual builder and quad shallow sizes in both header modes - if: runner.os == 'Linux' - run: python tools/test_quad_sizes.py - - name: Verify interrupted DH reads and preserved shared futures - if: runner.os == 'Linux' - run: python tools/test_terrain_read.py - - name: Upload original mod and pack manifests only - uses: actions/upload-artifact@v4 - with: - name: horizon-linux - path: | - dist/*.mrpack - dist/horizon-*.jar - dist/worker-pacing-benchmark.txt - dist/debounce-queue-benchmark.txt - dist/idle-queue-benchmark.txt - dist/object-header-benchmark.txt - dist/dispatch-integration.json - dist/tick-dedup-integration.json - dist/culling-empty-integration.json - dist/terrain-read-integration.json - dist/culling-rays-integration.json - dist/terrain-position-integration.json - dist/quad-reuse-integration.json - dist/quad-size-integration.json - dist/server-graphics-smoke.json - dist/client-graphics-smoke.json - dist/client-graphics-macos-title.json - dist/client-graphics-macos-world.json - retention-days: 3 diff --git a/benchmarks/server-four-way-2026-10-19/README.md b/benchmarks/server-four-way-2026-10-19/README.md index 570f5bb241..7048c27432 100644 --- a/benchmarks/server-four-way-2026-10-19/README.md +++ b/benchmarks/server-four-way-2026-10-19/README.md @@ -131,8 +131,8 @@ average) and reached the ThinkPad over the tailnet. It ran with Paper's defaults except `connection-throttle: -1` in `bukkit.yml`. Every bot connects from one address, and the default throttle (4 s) refused all but the first. Paperclip patched the pinned server jar from its cache. Same Java and heap. -- Fabric + Lithium: the pinned server jar on Fabric loader 0.19.5 (`packs/fabric.lock.json`) with Lithium - `mc26.3-0.26.2-fabric` (`packs/mods.lock.json`, checked against its SHA-512). Lithium needs no Fabric API. +- Fabric + Lithium: the pinned server jar on Fabric loader 0.19.5 (`tools/benchmark-deps/fabric.lock.json`) with Lithium + `mc26.3-0.26.2-fabric` (`tools/benchmark-deps/mods.lock.json`, checked against its SHA-512). Lithium needs no Fabric API. Same Java and heap. The Paper and Fabric jars are dev-only downloads into `.local/server-bench/jars` and are never committed or diff --git a/docs/README.md b/docs/README.md index 2e06b6e89f..b931775289 100644 --- a/docs/README.md +++ b/docs/README.md @@ -48,4 +48,4 @@ To play, use [the launcher](../launcher/README.md); the project site is [playhor ## The earlier Java track (no longer developed) -- [Java performance packs](java-packs.md), with [Vulkan on your Mac](vulkan.md), [collector comparisons](collectors.md), [profiling](profiling.md), [process memory](process-memory.md) and [tick state](tick-state.md). The Fabric server starter is retired: [host a server](hosting.md) with horizon-server. +- [Retired Java performance packs](java-packs.md); [JFR analysis for Java comparisons](profiling.md). diff --git a/docs/architecture.md b/docs/architecture.md index 99e9b630e3..29e98f2e6b 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -27,7 +27,7 @@ file selects ~103. | 10 | Launcher (124) | `launcher/src/` (`main.rs`, `backend.rs`, `cli.rs`, `mcp.rs`, `servers_page.rs`) | `cd launcher && cargo test`; `python3 tools/launcher_mcp_e2e.py` | | 11 | Mob types and species (117) | `L/mobs.rs`, `L/mobs/species.rs`, `L/mobs/data.rs`, `L/mobs/living.rs`, `L/mobs/drops.rs`, `L/mobs/gear.rs` | mob_attributes, entity_attribute, entity_death_loot, mob_ai | | 12 | Guests' actions on a server (98) | `G/lan_actions.rs` (`fn as_guest`, `fn tick_guests`), `G/lan_{attributes,pvp,chat,crafting,stations,trading,mount_menu,waypoints}.rs` | server_player_combat, server_player_damage, server_player_targets, lan_e2e (all) | -| 13 | Modpack porting, mod content (97) | `crates/horizon-port-pack/`, `L/mod_content.rs`, `tools/port_*.py`, `packs/` | `cargo test -p horizon-port-pack`; `python3 tools/mod_port_harness.py` | +| 13 | Modpack porting, mod content (97) | `crates/horizon-port-pack/`, `L/mod_content.rs`, `tools/port_*.py` | `cargo test -p horizon-port-pack`; `python3 tools/mod_port_harness.py` | | 14 | Mob AI (96) | `L/mobs/ai.rs`, `goals.rs`, `brain.rs`, `*_brain.rs`, `nav.rs`, `path.rs`, `control.rs` | mob_ai (probe `examples/mob_ai_probe.rs`; known failure on main: drowned_*, #290) | | 15 | Items and item use (96) | `L/items.rs`, `L/item_data.rs`, `G/hand.rs`, `G/consume.rs`, `G/potions.rs`, `L/effects.rs`; game.rs `fn use_hand`, `fn use_item` | use_item_on, item_use, item_use_lifecycle, consumable, consume_effect, status_effect | | 16 | Options and settings screens (93) | `L/options_ui.rs`, `G/options.rs`, `L/settings.rs`, `L/options_file.rs`, `L/graphics_ui.rs`, `L/graphics.rs` | options, toggle_keys | diff --git a/docs/benchmark.md b/docs/benchmark.md index 8bcc432e05..ca6c12e114 100644 --- a/docs/benchmark.md +++ b/docs/benchmark.md @@ -21,7 +21,7 @@ One game is started per window size (1280x720 and 1920x1080 by default) and rend - **Warm-up excluded.** Each scene's flight starts only after its chunks are loaded and drawn and 2 seconds have passed; the load itself is reported separately. JIT warm-up of the JVM during the first scene is part of vanilla's real behaviour and is not removed. - **The same statistics code.** Horizon returns its raw frame times (`horizon-ctl fly ... raw`) and the vanilla mod writes its own; `stats()` in the driver computes every figure for both. - **Vanilla as players run it.** Your own 26.3 client jar and libraries (as the official launcher installs them for your OS), the official launcher's default JVM arguments (`-Xmx2G` and its G1 options), Java 25. The game's assets index is not used, so neither game plays sound (Horizon runs with `HORIZON_NO_AUDIO=1`, vanilla with OpenAL's null device); textures, models and shaders come from the client jar as usual. -- **Performance mods.** `--game vanilla-mods` adds the Fabric builds for 26.3 of Sodium, Lithium, FerriteCore and ImmediatelyFast, the versions pinned with their hashes in `packs/mods.lock.json` (downloaded from Modrinth, never committed), plus Fabric API if one of them needs it. +- **Performance mods.** `--game vanilla-mods` adds the Fabric builds for 26.3 of Sodium, Lithium, FerriteCore and ImmediatelyFast, the versions pinned with their hashes in `tools/benchmark-deps/mods.lock.json` (downloaded from Modrinth, never committed), plus Fabric API if one of them needs it. ## Known caveats diff --git a/docs/collectors.md b/docs/collectors.md deleted file mode 100644 index 98b497328c..0000000000 --- a/docs/collectors.md +++ /dev/null @@ -1,48 +0,0 @@ -# Compare Java collectors - -Use the balanced pack first with the launcher's existing JVM policy. Java 25 -HotSpot supports explicit G1 (`-XX:+UseG1GC`) and ZGC (`-XX:+UseZGC`) selections; -the [Java command reference](https://docs.oracle.com/en/java/javase/25/docs/specs/man/java.html) -documents both. A collector choice can change CPU, heap headroom, collection -behavior and frame pacing. Lower pauses alone do not establish lower RAM or -higher FPS. The packs do not automatically select a collector. - -For a Mac comparison, duplicate one instance. In Edit > Settings > Java, enable -the Java Arguments override checkbox. Preserve existing non-collector arguments, -but use exactly one collector selector in each instance. Choose G1 in one and -ZGC in the other. Use the same native Java 25 ARM64, maximum/minimum heap, compact -header setting, world copy, resolution, shaders, distances and warmed camera route. -Alternate at least three 120-second runs rather than comparing unrelated captures. -Remove the explicit selector to restore the launcher's policy, then restart. - -The viewer shows the actual collector names captured by the game. Check them: -setting a launcher's text field does not establish which flags reached the VM. -Prism's per-instance Java Arguments and Memory settings have separate override -checkboxes. A global collector selection may need removal or replacement when -creating an explicit per-instance experiment. - -Record FPS, slowest-1% rate, frame spikes, heap and process RSS together. RSS does -not represent all shared GPU memory on Apple Silicon. `gc_time_ms` sums collector -MXBean counters; concurrent cycles and overlapping phases can contribute, so it -is not a measured pause total. Use JFR root pause events for pause analysis. -The streaming reader is checked against the JDK's event exporter with both -default-GC and ZGC fixtures in CI on Windows, Linux and ARM macOS. - -The developer demo launcher accepts `--gc default`, `--gc g1` or `--gc zgc`. -For example: - -```sh -python3 tools/runtime.py demo --instance .local/runtime/collector-test --heap 6G --gc zgc --compact-headers -python3 tools/test_jfr.py --gc zgc -``` - -Prepare demo mods/worlds before comparing. -Options affect only the launched process; they do not change global Java settings. -The collector and compact-header experiments can be tested independently. - -A local 3 GiB, compact-header ZGC client completed a 120-second game recording. -That recording also encountered a distant-terrain rejection storm. Its workload -and cache history differed from G1 captures, so the larger memory footprint and -different frame rate cannot be attributed to the collector alone. The dispatcher -experiment addresses the identified retry loop separately. No M2 collector -performance winner is established. diff --git a/docs/java-packs.md b/docs/java-packs.md index 66ee402d3e..36e76faf91 100644 --- a/docs/java-packs.md +++ b/docs/java-packs.md @@ -1,109 +1,15 @@ -# Java performance packs (no longer developed) +# Retired Java performance packs -Before the Rust rewrite, Horizon was a lab for Minecraft Java client performance: pinned Fabric performance packs, distant terrain, an original frame and tick recorder, and client and server starter downloads (the server starter is gone: [horizon-server](hosting.md) replaces it). This track is **no longer developed**. No release downloads are published; build the packs and starters locally with `python3 tools/build_release.py` (see [Build and run](#build-and-run)). This page keeps its documentation. +Before the Rust rewrite, Horizon shipped a Fabric optimization mod, performance pack profiles +and a Prism Launcher Mac starter. That product is retired. Its patches, profiles, builders, +starter, benchmark viewer and product-specific checks have been removed; use Git history +for the former implementation. Horizon's Rust game does not use those Java patches. -## Java packs: Mac starter (out of scope) - -Build **horizon-mac-starter-0.21.0.zip** with `python3 tools/build_release.py` (it lands in `dist/`), extract it and open `Mac-Start.command`. It verifies and installs official universal Prism Launcher in `~/Applications` if needed, then opens the balanced pack import. Sign into Microsoft **inside Prism yourself**. This project needs no credentials. - -Use native **Java 25 ARM64**, maximum heap **6144 MiB**, minimum **512 MiB** on a 16 GB M2 Pro Mac. Prism can download Java automatically. Start at 1280×800 or 1920×1200; full Retina resolution is a larger GPU workload. [START-HERE.txt](../packs/START-HERE.txt) has details. The same `.mrpack` files import into Prism on Windows and Linux. - -Core and balanced passed macOS title and demo-world rendering probes on the hosted -ARM64 software renderer, including readback, saves and clean exits. Physical M2 -GPU performance and macOS 27 were never tested. - -| Profile | Full-detail chunks | Distant LOD radius | Suggested maximum heap | -| --- | ---: | ---: | ---: | -| baseline | 12 | none | 6144 MiB | -| core-performance | 12 | none | 6144 MiB | -| m2-balanced | 12 | 128 | 6144 MiB | -| adaptive (experiment) | 12 | 128 | 6144 MiB | -| worker-pacing (experiment) | 12 | 128 | 6144 MiB | -| adaptive-pacing (experiment) | 12 | 128 | 6144 MiB | -| queue-wait (experimental) | 12 | 128 | 6144 MiB | -| adaptive-queue (experimental) | 12 | 128 | 6144 MiB | -| dispatch-retry (experimental) | 12 | 128 | 6144 MiB | -| tick-dedup (experimental) | 12 | 128 | 6144 MiB | -| culling-empty (experimental) | 12 | 128 | 6144 MiB | -| quad-reuse (experimental) | 12 | 128 | 6144 MiB | -| terrain-position (experimental) | 12 | 128 | 6144 MiB | -| culling-rays (experimental) | 12 | 128 | 6144 MiB | -| foreground-first (combined experiment) | 12 | 128 | 6144 MiB | -| foreground-vulkan (combined experiment) | 12 | 128 | 6144 MiB | -| low-memory | 8 | none | 3072 MiB | -| far-distance | 12 | 256 | 8192 MiB, with sufficient physical RAM | -| cinematic | 12 | 128 | 6144 MiB | -| vulkan | 12 | 128 | 6144 MiB | - -Balanced combines [Sodium](https://modrinth.com/mod/sodium), [Lithium](https://modrinth.com/mod/lithium), [FerriteCore](https://modrinth.com/mod/ferrite-core), [ImmediatelyFast](https://modrinth.com/mod/immediatelyfast), [EntityCulling](https://modrinth.com/mod/entityculling), and [Distant Horizons](https://modrinth.com/mod/distanthorizons). Cinematic adds [Iris](https://modrinth.com/mod/iris) and [Complementary Reimagined](https://modrinth.com/shader/complementary-reimagined), initially disabled. Vulkan independently experiments with the game's own backend and fallback, without Iris. - -Distant LOD is simplified terrain. Nearby blocks retain full detail. Initial generation costs CPU/disk/memory and needs warm-up. DH adjusts clouds, chunk fade and transparency to blend its renderer; assess appearance as well as speed. Shaders cost GPU time and have [Mac-specific limits](https://shaders.properties/current/reference/miscellaneous/macos/). Universal CPU/GPU support and exact vanilla equivalence remain validation goals. Simulation distance stays 12 in every profile; normal 20 TPS rules are retained. - -For the first comparison at the same view distance, use `baseline` versus -`core-performance`: both select 12 full-detail chunks and no distant LOD or shaders. -The latter adds only the pinned core performance mods and leaves every original -controller disabled. Then test balanced separately for its additional distant -terrain. Matching captured settings does not prove pixel-identical rendering. - -The profiles marked *experiment* each isolate one change to Distant Horizons, -EntityCulling or the JVM (adaptive terrain throttling, precise worker pacing, -debounce-queue waits, rejected-dispatch retries, empty culling whitelists, -culling ray scratch vectors, terrain quad reuse, terrain position arithmetic, -tick membership storage, a smaller heap, compact object headers). Each kept the -upstream behaviour it replaced and was measured only on Linux software rendering, -where none showed a gain large enough to enable by default; balanced keeps them -all off. Their write-ups were removed once the Rust rewrite replaced this track; -they remain in Git history. Matched software-rendered pairs showed `core-performance` -14–21% faster than `baseline`, and Vulkan about 1.5% more FPS for about 12% more -CPU; neither is evidence for a Mac GPU. - -To try the game's own Vulkan backend on a Mac, see [Vulkan on your Mac](vulkan.md); -to compare garbage collectors, see [collector comparisons](collectors.md). - -## Measure on your hardware - -Press **F8** during gameplay to start a 120-second recording, or again to stop early. Rebind in Controls if needed. This also works with restricted chat accounts. Alternatively: `/horizon bench