[PR #22] [MERGED] Measure quad reuse retention separately from allocation savings #2273

Closed
opened 2026-11-02 15:54:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/22
Author: @ludovic111
Created: 10/4/2026
Status: ✅ Merged
Merged: 10/4/2026
Merged by: @ludovic111

Base: main ← Head: quad-retention-size


📝 Commits (5)

  • 25cfc7f Measure applied quad reuse shallow retention with a private agent
  • 7dc6991 Merge remote-tracking branch 'origin/main' into quad-retention-size
  • 875a7d8 Merge remote-tracking branch 'origin/main' into quad-retention-size
  • 1243e14 Quote instrumentation agent paths with spaces
  • 8052fb0 Record reproducible local quad size results and JVM layout

📊 Changes

7 files changed (+332 additions, -0 deletions)

View changed files

📝 .github/workflows/ci.yml (+6 -0)
➕ benchmarks/quad-reuse-2026-10-04/local-shallow-size-applied.json (+87 -0)
➕ benchmarks/quad-reuse-2026-10-04/shallow-size-observations.json (+69 -0)
📝 docs/quad-reuse.md (+38 -0)
➕ mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/QuadSizeIntegration.java (+31 -0)
➕ mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ObjectSizeAgent.java (+7 -0)
➕ tools/test_quad_sizes.py (+94 -0)

📄 Description

Lower temporary allocation does not establish lower retained game RAM. Add a private Java instrumentation agent and Fabric fixture that measure the actual quad builder and pending scratch object in separate hook-off/on processes, with compact headers off/on. Four adjacent faces must premerge to one geometry quad in every combination. Reports record shallow sizes, JVM runtime, alignment and compressed-reference settings; the agent and fixture remain excluded from playable packs.

The initial local corrected probe measured a 56-byte extra builder-plus-scratch footprint in either header mode: without compact headers the reference fits builder padding; with compact headers the builder grows by eight bytes and the retained quad is 48 bytes. This is local Linux x64 Java 25 shallow sizing, excluding existing pools/lists and every other object. It is not deep heap, RSS, unified memory, FPS or Mac performance evidence. Selected observations preserve private-probe provenance, and the reusable public source expands the metadata.

Validation: 40 offline checks pass after integrating the launcher and dispatcher fixes. The agent and final fixture compile locally. The four initial private Fabric processes exit successfully with matching one-quad geometry; the reusable driver also passes all four combinations locally with expanded JVM metadata and reproduces the initial sizes. A separate Java source-launcher check verifies agent loading from a quoted path containing spaces. The final revision passes Windows/macOS ARM/Linux/verify checks in run 37179177150. Its independent Linux measurements match the local layouts and 56-byte differences, and the production JAR matches the local v0.18 binary byte-for-byte. CI compiles the private helpers on Windows, macOS ARM and Linux, runs the four combinations on Linux and uploads only the result JSON.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/22 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/4/2026 **Status:** ✅ Merged **Merged:** 10/4/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `quad-retention-size` --- ### 📝 Commits (5) - [`25cfc7f`](https://github.com/horizon-rust/horizon/commit/25cfc7f5b3037fa976a56f606afd59edea1ed61e) Measure applied quad reuse shallow retention with a private agent - [`7dc6991`](https://github.com/horizon-rust/horizon/commit/7dc69910ed2698f967839dcb73639c036be40f05) Merge remote-tracking branch 'origin/main' into quad-retention-size - [`875a7d8`](https://github.com/horizon-rust/horizon/commit/875a7d8de00534b28e4b3ba16e0b11b28d2b5689) Merge remote-tracking branch 'origin/main' into quad-retention-size - [`1243e14`](https://github.com/horizon-rust/horizon/commit/1243e148d455cd83f18b66f70bcfe2b8a4b746c9) Quote instrumentation agent paths with spaces - [`8052fb0`](https://github.com/horizon-rust/horizon/commit/8052fb0fbb95aa96e9dca19b4ba17978e21ca2cf) Record reproducible local quad size results and JVM layout ### 📊 Changes **7 files changed** (+332 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+6 -0) ➕ `benchmarks/quad-reuse-2026-10-04/local-shallow-size-applied.json` (+87 -0) ➕ `benchmarks/quad-reuse-2026-10-04/shallow-size-observations.json` (+69 -0) 📝 `docs/quad-reuse.md` (+38 -0) ➕ `mods/horizon-lab/src/test/java/dev/horizonlab/dispatch/QuadSizeIntegration.java` (+31 -0) ➕ `mods/horizon-lab/src/test/java/dev/horizonlab/metrics/ObjectSizeAgent.java` (+7 -0) ➕ `tools/test_quad_sizes.py` (+94 -0) </details> ### 📄 Description Lower temporary allocation does not establish lower retained game RAM. Add a private Java instrumentation agent and Fabric fixture that measure the actual quad builder and pending scratch object in separate hook-off/on processes, with compact headers off/on. Four adjacent faces must premerge to one geometry quad in every combination. Reports record shallow sizes, JVM runtime, alignment and compressed-reference settings; the agent and fixture remain excluded from playable packs. The initial local corrected probe measured a 56-byte extra builder-plus-scratch footprint in either header mode: without compact headers the reference fits builder padding; with compact headers the builder grows by eight bytes and the retained quad is 48 bytes. This is local Linux x64 Java 25 shallow sizing, excluding existing pools/lists and every other object. It is not deep heap, RSS, unified memory, FPS or Mac performance evidence. Selected observations preserve private-probe provenance, and the reusable public source expands the metadata. Validation: 40 offline checks pass after integrating the launcher and dispatcher fixes. The agent and final fixture compile locally. The four initial private Fabric processes exit successfully with matching one-quad geometry; the reusable driver also passes all four combinations locally with expanded JVM metadata and reproduces the initial sizes. A separate Java source-launcher check verifies agent loading from a quoted path containing spaces. The final revision passes Windows/macOS ARM/Linux/verify checks in run 37179177150. Its independent Linux measurements match the local layouts and 56-byte differences, and the production JAR matches the local v0.18 binary byte-for-byte. CI compiles the private helpers on Windows, macOS ARM and Linux, runs the four combinations on Linux and uploads only the result JSON. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:54:33 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2273
No description provided.