[PR #225] [MERGED] perf(launcher): fetch startup releases once for list and updates #2418

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

📋 Pull Request Information

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

Base: main ← Head: perf/single-release-fetch-20261014


📝 Commits (1)

  • aec1519 perf(launcher): share startup release response with update check

📊 Changes

4 files changed (+343 additions, -10 deletions)

View changed files

➕ launcher/benchmarks/release-loading.md (+46 -0)
📝 launcher/src/backend.rs (+45 -8)
➕ launcher/src/backend/release_loading_tests.rs (+240 -0)
📝 launcher/src/main.rs (+12 -2)

📄 Description

Launcher startup currently fetches the same GitHub release list twice, on separate release-loading and update-check workers. This change uses one response to populate the game release list and initial update state, removing one request, one JSON decode and one game-release parse.

The game-release message is sent before potentially slow older-launcher fallback requests, preserving release-page and opening readiness. List failures reach both states; failed launcher fallback still preserves game results. Existing development/disabled self-update guards, auto-install handling, release-page retry and fresh manual/four-hour checks remain intact. No persistent cache or extra game-release-vector copy is added.

Benchmark

Reproducible ignored test and details: launcher/benchmarks/release-loading.md. The benchmark exercises the actual shared backend orchestration with a counted mock fetch, comparing the former decode/parse paths on identical bytes and validating equivalent results. Synthetic 453,197-byte JSON: 100 releases, roughly 4 KiB notes per game release. Linux x86_64, Ryzen 5 5600X, Rust 1.99.0, unoptimized test profile/debug=0; 20 warmups and 201 samples, median, black_box.

Scenario Before After Ratio Release-list fetches/startup
Serial decode/parse work, no transport delay 14.701 ms 7.339 ms 2.003x 2 → 1
Two concurrent old workers vs one shared worker, 5 ms/mock fetch 14.778 ms 13.642 ms 1.083x 2 → 1

Measured fetch totals: 402 → 201. Concurrent elapsed time fell 7.7%; the old requests overlapped, so request reduction does not imply half the startup latency. This is a fixture benchmark, not real-network, release-build or end-to-end startup timing. HTTP/TLS, installation scans, GUI rendering and downloads are excluded; fallback ordering/errors have separate tests.

Validation

All Cargo commands used CARGO_INCREMENTAL=0 and a shared target directory. Launcher dev/test debug info was disabled to bound disk usage.

  • cargo check --manifest-path launcher/Cargo.toml --locked --all-targets: passed, including GUI compilation.
  • cargo test --manifest-path launcher/Cargo.toml --locked --lib: 26 passed, 1 benchmark ignored.
  • Explicit ignored benchmark: passed; both scenarios verified output equivalence and 2 → 1 fetches.
  • cargo clippy --manifest-path launcher/Cargo.toml --locked --all-targets -- -D warnings: passed.
  • Root and launcher cargo fmt --all -- --check; git diff --check: passed.

The GUI was not launched interactively. Cargo reports an existing dependency future-compatibility notice for proc-macro-error2; checks completed successfully.


🔄 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/225 **Author:** [@rdbtCVS](https://github.com/rdbtCVS) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/single-release-fetch-20261014` --- ### 📝 Commits (1) - [`aec1519`](https://github.com/horizon-rust/horizon/commit/aec1519f915bd40711387d43969fa104e7e0641f) perf(launcher): share startup release response with update check ### 📊 Changes **4 files changed** (+343 additions, -10 deletions) <details> <summary>View changed files</summary> ➕ `launcher/benchmarks/release-loading.md` (+46 -0) 📝 `launcher/src/backend.rs` (+45 -8) ➕ `launcher/src/backend/release_loading_tests.rs` (+240 -0) 📝 `launcher/src/main.rs` (+12 -2) </details> ### 📄 Description Launcher startup currently fetches the same GitHub release list twice, on separate release-loading and update-check workers. This change uses one response to populate the game release list and initial update state, removing one request, one JSON decode and one game-release parse. The game-release message is sent before potentially slow older-launcher fallback requests, preserving release-page and opening readiness. List failures reach both states; failed launcher fallback still preserves game results. Existing development/disabled self-update guards, auto-install handling, release-page retry and fresh manual/four-hour checks remain intact. No persistent cache or extra game-release-vector copy is added. ## Benchmark Reproducible ignored test and details: `launcher/benchmarks/release-loading.md`. The benchmark exercises the actual shared backend orchestration with a counted mock fetch, comparing the former decode/parse paths on identical bytes and validating equivalent results. Synthetic 453,197-byte JSON: 100 releases, roughly 4 KiB notes per game release. Linux x86_64, Ryzen 5 5600X, Rust 1.99.0, unoptimized test profile/debug=0; 20 warmups and 201 samples, median, `black_box`. | Scenario | Before | After | Ratio | Release-list fetches/startup | | --- | ---: | ---: | ---: | ---: | | Serial decode/parse work, no transport delay | 14.701 ms | 7.339 ms | 2.003x | 2 → 1 | | Two concurrent old workers vs one shared worker, 5 ms/mock fetch | 14.778 ms | 13.642 ms | 1.083x | 2 → 1 | Measured fetch totals: 402 → 201. Concurrent elapsed time fell 7.7%; the old requests overlapped, so request reduction does not imply half the startup latency. This is a fixture benchmark, not real-network, release-build or end-to-end startup timing. HTTP/TLS, installation scans, GUI rendering and downloads are excluded; fallback ordering/errors have separate tests. ## Validation All Cargo commands used `CARGO_INCREMENTAL=0` and a shared target directory. Launcher dev/test debug info was disabled to bound disk usage. - `cargo check --manifest-path launcher/Cargo.toml --locked --all-targets`: passed, including GUI compilation. - `cargo test --manifest-path launcher/Cargo.toml --locked --lib`: 26 passed, 1 benchmark ignored. - Explicit ignored benchmark: passed; both scenarios verified output equivalence and 2 → 1 fetches. - `cargo clippy --manifest-path launcher/Cargo.toml --locked --all-targets -- -D warnings`: passed. - Root and launcher `cargo fmt --all -- --check`; `git diff --check`: passed. The GUI was not launched interactively. Cargo reports an existing dependency future-compatibility notice for `proc-macro-error2`; checks completed successfully. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:55:55 +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#2418
No description provided.