From 43469691a4bc499f21e4f6f4257cc26c74fcb6b1 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sun, 4 Oct 2026 06:43:23 +0200 Subject: [PATCH] Record quad reuse geometry checks and qualified live comparison --- .../exploratory-observations.json | 67 +++++++ .../linux-applied-hooks.json | 75 ++++++++ .../live-observations.json | 166 ++++++++++++++++++ .../local-applied-hooks.json | 75 ++++++++ docs/quad-reuse.md | 26 +++ 5 files changed, 409 insertions(+) create mode 100644 benchmarks/quad-reuse-2026-10-04/exploratory-observations.json create mode 100644 benchmarks/quad-reuse-2026-10-04/linux-applied-hooks.json create mode 100644 benchmarks/quad-reuse-2026-10-04/live-observations.json create mode 100644 benchmarks/quad-reuse-2026-10-04/local-applied-hooks.json diff --git a/benchmarks/quad-reuse-2026-10-04/exploratory-observations.json b/benchmarks/quad-reuse-2026-10-04/exploratory-observations.json new file mode 100644 index 000000000..0c2f7a16d --- /dev/null +++ b/benchmarks/quad-reuse-2026-10-04/exploratory-observations.json @@ -0,0 +1,67 @@ +{ + "schema": 1, + "purpose": "Earlier private quad-reuse explorations; CPU mixed and allocation reduction is not retained RAM/FPS", + "original_mod_sha256": "98f8db7ca8962a71625eef835f57d25c8afb802f2cf1b7c4c832fc070757e011", + "private_fixture_sources": "Uncommitted private prototype before the production-hook fixture; not the final reproducible protocol", + "observations": [ + { + "private_probe": "latest-discarded-object", + "results": [ + { + "enabled": false, + "applied_hook_checked": true, + "geometry_digest": "31509677879305c6a721677b38516fda0336f8c7b53dc3946839eb6fbf7fd0ee", + "geometry_quads": 108358, + "input_faces": 55296, + "measured_faces": 3072000, + "checksum": 60000, + "cpu_ns": 166481448, + "allocated_bytes": 144576000, + "observations": [ + { + "cpu_ns": 54349387, + "allocated_bytes": 48192000 + }, + { + "cpu_ns": 84133914, + "allocated_bytes": 48192000 + }, + { + "cpu_ns": 27998147, + "allocated_bytes": 48192000 + } + ] + }, + { + "enabled": true, + "applied_hook_checked": true, + "geometry_digest": "31509677879305c6a721677b38516fda0336f8c7b53dc3946839eb6fbf7fd0ee", + "geometry_quads": 108358, + "input_faces": 55296, + "measured_faces": 3072000, + "checksum": 60000, + "cpu_ns": 185505067, + "allocated_bytes": 2016000, + "observations": [ + { + "cpu_ns": 59897923, + "allocated_bytes": 672000 + }, + { + "cpu_ns": 63778316, + "allocated_bytes": 672000 + }, + { + "cpu_ns": 61828828, + "allocated_bytes": 672000 + } + ] + } + ] + }, + { + "private_probe": "first-discarded-object", + "results": [] + } + ] +} diff --git a/benchmarks/quad-reuse-2026-10-04/linux-applied-hooks.json b/benchmarks/quad-reuse-2026-10-04/linux-applied-hooks.json new file mode 100644 index 000000000..604b03ae4 --- /dev/null +++ b/benchmarks/quad-reuse-2026-10-04/linux-applied-hooks.json @@ -0,0 +1,75 @@ +{ + "schema": 1, + "platform": "Linux-6.17.0-1022-azure-x86_64-with-glibc2.39", + "architecture": "x86_64", + "minecraft": "26.3", + "distant_horizons": "3.3.4", + "original_mod_sha256": "2196637c5b2180a33fa5b926ab51069ab480618c1186b8a02872c7e758be0a70", + "results": [ + { + "enabled": false, + "applied_hook_checked": true, + "geometry_digest": "8251175aa3e3cac30bb1366f8b40d0576c17978076ea7d244ff4d7cc361da7ee", + "thread_geometry_digest": "096a85be06031d248f12e536e19e5c0496bb00c80f3387f670a0fae29438a732", + "thread_workers": 4, + "geometry_quads": 108358, + "input_faces": 55296, + "measured_faces": 3072000, + "checksum": 60000, + "cpu_ns": 40437624, + "allocated_bytes": 144576000, + "observations": [ + { + "cpu_ns": 13455029, + "allocated_bytes": 48192000 + }, + { + "cpu_ns": 13828075, + "allocated_bytes": 48192000 + }, + { + "cpu_ns": 13154520, + "allocated_bytes": 48192000 + } + ] + }, + { + "enabled": true, + "applied_hook_checked": true, + "geometry_digest": "8251175aa3e3cac30bb1366f8b40d0576c17978076ea7d244ff4d7cc361da7ee", + "thread_geometry_digest": "096a85be06031d248f12e536e19e5c0496bb00c80f3387f670a0fae29438a732", + "thread_workers": 4, + "geometry_quads": 108358, + "input_faces": 55296, + "measured_faces": 3072000, + "checksum": 60000, + "cpu_ns": 44074799, + "allocated_bytes": 2016000, + "observations": [ + { + "cpu_ns": 16004752, + "allocated_bytes": 672000 + }, + { + "cpu_ns": 14047833, + "allocated_bytes": 672000 + }, + { + "cpu_ns": 14022214, + "allocated_bytes": 672000 + } + ] + } + ], + "notes": [ + "Actual publisher quad builder inside Fabric with generated faces and lighting/material values.", + "Opaque/translucent geometry, pooled error flags and every retained quad field match before and after upstream merging.", + "Fresh allocations reuse at most one discarded successful-premerge quad; existing pool selection stays upstream.", + "Three sequential warmed caller-loop observations are not independent forks; compilation can vary.", + "Allocation reduction is not retained RAM, game FPS or a Mac GPU benchmark." + ], + "provenance": { + "source_commit": "0a0cd667d5cfdee7c59f5fe2c7a2eb15bd19e66e", + "workflow_run": "https://github.com/ludovic111/minecraft-optimization-lab/actions/runs/37175709062" + } +} diff --git a/benchmarks/quad-reuse-2026-10-04/live-observations.json b/benchmarks/quad-reuse-2026-10-04/live-observations.json new file mode 100644 index 000000000..e73f30af8 --- /dev/null +++ b/benchmarks/quad-reuse-2026-10-04/live-observations.json @@ -0,0 +1,166 @@ +{ + "schema": 1, + "minecraft": "26.3", + "distant_horizons": "3.3.4", + "original_mod_sha256": "2196637c5b2180a33fa5b926ab51069ab480618c1186b8a02872c7e758be0a70", + "platform": "Linux x86_64", + "graphics": "llvmpipe software OpenGL", + "settings": { + "heap_bytes": 3221225472, + "gc": "G1", + "compact_headers": true, + "render_distance": 12, + "simulation_distance": 12, + "lod_radius_chunks": 128, + "lod_quality": "MEDIUM/MEDIUM/BLOCK", + "terrain_workers": 2, + "runtime_ratio": 0.5, + "world_difficulty": "PEACEFUL" + }, + "results": [ + { + "profile": "m2-balanced", + "quad_reuse_enabled": false, + "elapsed_seconds": 120.415309971, + "frame_samples": 220, + "tick_samples": 2400, + "excluded_frames": 0, + "dropped_samples": 0, + "visual_settings_changed": [], + "frame_stats": { + "count": 220, + "meanMs": 542.3438610045455, + "p50Ms": 522.365908, + "p95Ms": 713.237831, + "p99Ms": 860.91664, + "maxMs": 885.115974, + "meanRate": 1.8438486574693962, + "lowOnePercentRate": 1.1446485854821962, + "over16Ms": 220, + "over33Ms": 220, + "over50Ms": 220, + "over100Ms": 220 + }, + "tick_stats": { + "count": 2400, + "meanMs": 9.639125558749999, + "p50Ms": 9.137695, + "p95Ms": 16.989389, + "p99Ms": 25.152306, + "maxMs": 52.879001, + "meanRate": 103.74385040479541, + "lowOnePercentRate": 30.37834831626593, + "over16Ms": 133, + "over33Ms": 8, + "over50Ms": 2, + "over100Ms": 0 + }, + "process_rss_peak_sampled_bytes": 3129790464, + "render_loader_allocation_counters": [ + { + "thread_id": 124, + "thread": "DH-Render Loader Thread[1]", + "counter_observations": 2, + "observed_seconds": 64.375191422, + "observed_allocated_bytes": 97869576, + "observed_bytes_per_second": 1520299.5725237317 + }, + { + "thread_id": 123, + "thread": "DH-Render Loader Thread[0]", + "counter_observations": 2, + "observed_seconds": 64.375191422, + "observed_allocated_bytes": 91443128, + "observed_bytes_per_second": 1420471.5509203072 + } + ], + "preceding_jfr_gc_pause_total_ms": 263.975028, + "preceding_jfr_gc_pause_longest_ms": 45.0698 + }, + { + "profile": "quad-reuse", + "quad_reuse_enabled": true, + "elapsed_seconds": 120.476138714, + "frame_samples": 224, + "tick_samples": 2401, + "excluded_frames": 0, + "dropped_samples": 0, + "visual_settings_changed": [], + "frame_stats": { + "count": 224, + "meanMs": 532.6331643258928, + "p50Ms": 505.6209, + "p95Ms": 735.235244, + "p99Ms": 774.189261, + "maxMs": 926.006251, + "meanRate": 1.8774647674551252, + "lowOnePercentRate": 1.208934822852848, + "over16Ms": 224, + "over33Ms": 224, + "over50Ms": 224, + "over100Ms": 224 + }, + "tick_stats": { + "count": 2401, + "meanMs": 9.308558193669304, + "p50Ms": 8.82277, + "p95Ms": 16.529268, + "p99Ms": 22.206144, + "maxMs": 95.741877, + "meanRate": 107.42802259968617, + "lowOnePercentRate": 30.32324112917506, + "over16Ms": 114, + "over33Ms": 8, + "over50Ms": 3, + "over100Ms": 0 + }, + "process_rss_peak_sampled_bytes": 3100016640, + "render_loader_allocation_counters": [ + { + "thread_id": 125, + "thread": "DH-Render Loader Thread[1]", + "counter_observations": 2, + "observed_seconds": 64.347664971, + "observed_allocated_bytes": 116155920, + "observed_bytes_per_second": 1805130.3035214841 + }, + { + "thread_id": 124, + "thread": "DH-Render Loader Thread[0]", + "counter_observations": 2, + "observed_seconds": 64.347664971, + "observed_allocated_bytes": 104401656, + "observed_bytes_per_second": 1622462.229935638 + } + ], + "preceding_jfr_gc_pause_total_ms": 166.770211, + "preceding_jfr_gc_pause_longest_ms": 46.786101 + } + ], + "provenance": { + "source_commit": "0a0cd667d5cfdee7c59f5fe2c7a2eb15bd19e66e", + "workflow_run": "https://github.com/ludovic111/minecraft-optimization-lab/actions/runs/37175709062", + "runtime_mod_matches_linux_ci": true, + "initial_player_snapshot_sha256": "b4d11dbd6443625415a1e32aa242d0e2d09cd77ddb1becfde5d35cb6ab8d278a", + "source_level_snapshot_sha256": "86a3c75ea993e50c4428da4dbadc5856688a9367f035c41b8bb49863a9aeb644", + "first_saved_player_position": [ + -56.5, + 69.0, + 55.5 + ], + "first_saved_player_rotation": [ + 141.5, + 16.950002670288086 + ], + "first_saved_cameras_matched": true + }, + "notes": [ + "Fixed-order candidate then control single pair from separate copies of the same private world. Both stationary captures start approximately 307 seconds after the demo popup is dismissed; first saved cameras match.", + "Both reports have zero menu/pause/focus exclusions, no dropped samples and matching captured settings apart from the isolated quad hook. CSV counts and actual offline viewer timelines pass.", + "The preceding 60-second JFR recordings begin approximately 121 seconds after dismissal. Allocation counters have their own approximately 64-second spans; GC pause data is from those recordings, not from the later frame captures.", + "Render-loader allocation counter rates are higher in this candidate observation. Task-completion/geometry volumes and cache/JIT effects are not controlled quantitatively. No useful live allocation improvement is established.", + "Frame count and sampled peak RSS differences in this single software-rendered pair do not establish a meaningful game speed or retained-memory gain. RSS is not complete GPU/unified RAM. Not an Apple Silicon benchmark.", + "Candidate saved, reloaded, saved again and exited with launcher code zero. Control saved, closed all terrain databases and exited with launcher code zero.", + "No private worlds, full game logs or JFR recordings are included in these selected observations." + ] +} diff --git a/benchmarks/quad-reuse-2026-10-04/local-applied-hooks.json b/benchmarks/quad-reuse-2026-10-04/local-applied-hooks.json new file mode 100644 index 000000000..bbaa70048 --- /dev/null +++ b/benchmarks/quad-reuse-2026-10-04/local-applied-hooks.json @@ -0,0 +1,75 @@ +{ + "schema": 1, + "platform": "Linux-7.0.0-31-generic-x86_64-with-glibc2.43", + "architecture": "x86_64", + "minecraft": "26.3", + "distant_horizons": "3.3.4", + "original_mod_sha256": "2196637c5b2180a33fa5b926ab51069ab480618c1186b8a02872c7e758be0a70", + "results": [ + { + "enabled": false, + "applied_hook_checked": true, + "geometry_digest": "8251175aa3e3cac30bb1366f8b40d0576c17978076ea7d244ff4d7cc361da7ee", + "thread_geometry_digest": "096a85be06031d248f12e536e19e5c0496bb00c80f3387f670a0fae29438a732", + "thread_workers": 4, + "geometry_quads": 108358, + "input_faces": 55296, + "measured_faces": 3072000, + "checksum": 60000, + "cpu_ns": 198847198, + "allocated_bytes": 144576000, + "observations": [ + { + "cpu_ns": 82119774, + "allocated_bytes": 48192000 + }, + { + "cpu_ns": 60671068, + "allocated_bytes": 48192000 + }, + { + "cpu_ns": 56056356, + "allocated_bytes": 48192000 + } + ] + }, + { + "enabled": true, + "applied_hook_checked": true, + "geometry_digest": "8251175aa3e3cac30bb1366f8b40d0576c17978076ea7d244ff4d7cc361da7ee", + "thread_geometry_digest": "096a85be06031d248f12e536e19e5c0496bb00c80f3387f670a0fae29438a732", + "thread_workers": 4, + "geometry_quads": 108358, + "input_faces": 55296, + "measured_faces": 3072000, + "checksum": 60000, + "cpu_ns": 178894413, + "allocated_bytes": 2016000, + "observations": [ + { + "cpu_ns": 60070905, + "allocated_bytes": 672000 + }, + { + "cpu_ns": 60020252, + "allocated_bytes": 672000 + }, + { + "cpu_ns": 58803256, + "allocated_bytes": 672000 + } + ] + } + ], + "notes": [ + "Actual publisher quad builder inside Fabric with generated faces and lighting/material values.", + "Opaque/translucent geometry, pooled error flags and every retained quad field match before and after upstream merging.", + "Fresh allocations reuse at most one discarded successful-premerge quad; existing pool selection stays upstream.", + "Three sequential warmed caller-loop observations are not independent forks; compilation can vary.", + "Allocation reduction is not retained RAM, game FPS or a Mac GPU benchmark." + ], + "provenance": { + "source_commit": "0a0cd667d5cfdee7c59f5fe2c7a2eb15bd19e66e", + "fixture_protocol": "55,296 generated faces plus four concurrent builders, geometry/list boundaries checked before and after upstream merge; warm 2,000 batches, then 500 warm batches and 2,000 measured batches per sequential observation, 512 faces/batch" + } +} diff --git a/docs/quad-reuse.md b/docs/quad-reuse.md index 52d4f5c65..896728e51 100644 --- a/docs/quad-reuse.md +++ b/docs/quad-reuse.md @@ -40,3 +40,29 @@ The hook adds a reference and can retain one discarded object per builder. Lower allocation is not a measurement of lower retained heap, process RSS, unified memory, game FPS or Apple Silicon performance. Live startup, capture, save/reload and independent platform checks are required before recommending it. + +Raw [production-hook results](../benchmarks/quad-reuse-2026-10-04/local-applied-hooks.json) +and [private exploratory observations](../benchmarks/quad-reuse-2026-10-04/exploratory-observations.json) +retain protocol and provenance limits. The current fixture fingerprints include +opaque/translucent list boundaries, face indices and list sizes. A baseline +without DH reaches the menu and exits with code zero. + +The independent [Linux CI fixture](../benchmarks/quad-reuse-2026-10-04/linux-applied-hooks.json) +matched the geometry and four-worker fingerprints. Its allocation totals matched +the local reduction, but caller CPU was about 40.4 ms upstream versus 44.1 ms +with reuse, so this check does not support a universal CPU improvement. Windows, +macOS ARM and Linux checks pass, and the Linux production JAR matches the local +binary byte-for-byte. + +The [live software-rendered observations](../benchmarks/quad-reuse-2026-10-04/live-observations.json) +record 220 control versus 224 candidate frames over roughly 120 seconds, with +zero exclusions and matching captured settings and first saved cameras. Peak +sampled RSS differed by less than one percent. Preceding render-loader allocation +counter rates were higher with reuse in this pair. Task completion/geometry +volumes and cache/JIT effects are not quantitatively controlled, so neither the +small frame/RSS differences nor these counters establish a useful game +performance or memory improvement. The candidate saved, reloaded, saved again +and exited with code zero; the control saved, closed its terrain databases and +exited with code zero. +Actual JSON/CSV comparison and mobile layout checks pass. The hook remains an +optional experiment, disabled in combined profiles.