perf: batch catalog queries and decouple runtime workers #3

Merged
Wuast94 merged 21 commits from perf/runtime-audit into main 2026-10-18 07:50:44 +02:00
Owner

Catalog requests repeatedly loaded whole graphs and hydrated each result separately; shared runtime work also delayed unrelated HTTP processing. This batches native/scalar selection and complete final-page acquisition, preserves the existing DTO/ACL/source validators, and separates ordered webhook delivery from internal events.

The package also improves scanner/metadata/intro work, retains stream descriptor ownership, caches validated image/subtitle/segment work, and includes the prepared deterministic uroman build fix. API and runtime contracts stay intact.

Validation:

  • Full just gate: 721 Rust tests passed, none failed or ignored; schema, Clippy, advisories and dependency checks passed.
  • Normal host release build passed in 12m22s with existing Fat-LTO, codegen-units, toolchain and feature defaults.
  • 72 final HTTP requests against the same restored 21,348-item database: deterministic responses and inventory/history unchanged across debug/release and both user profiles.
  • Warm host-release requests: Resume ~180 ms, representative NextUp ~230 ms, Latest ~82 ms, Recommendations ~225 ms. First full-quality image transform ~163 ms.

Remaining measured limits are explicit: Views ~1.4s, Search ~1.2s, broad-history NextUp ~1.6s and variable Suggestions ~1–2s remain database-bound. Startup still performs all 10,635 native capability processes. These are follow-up design decisions, not claimed solved by release compilation.

Only index migration 42 is added. Retain a verified pre-upgrade backup: the old image does not recognize that migration, so rollback requires its supported database restore path. PR production-image acceptance must pass before merge; cluster deployment and native Intel/API acceptance follow the release. No UI or screenshots.

Compact evidence and source boundaries: docs/performance-audit.md.

Catalog requests repeatedly loaded whole graphs and hydrated each result separately; shared runtime work also delayed unrelated HTTP processing. This batches native/scalar selection and complete final-page acquisition, preserves the existing DTO/ACL/source validators, and separates ordered webhook delivery from internal events. The package also improves scanner/metadata/intro work, retains stream descriptor ownership, caches validated image/subtitle/segment work, and includes the prepared deterministic uroman build fix. API and runtime contracts stay intact. Validation: - Full `just gate`: 721 Rust tests passed, none failed or ignored; schema, Clippy, advisories and dependency checks passed. - Normal host release build passed in 12m22s with existing Fat-LTO, codegen-units, toolchain and feature defaults. - 72 final HTTP requests against the same restored 21,348-item database: deterministic responses and inventory/history unchanged across debug/release and both user profiles. - Warm host-release requests: Resume ~180 ms, representative NextUp ~230 ms, Latest ~82 ms, Recommendations ~225 ms. First full-quality image transform ~163 ms. Remaining measured limits are explicit: Views ~1.4s, Search ~1.2s, broad-history NextUp ~1.6s and variable Suggestions ~1–2s remain database-bound. Startup still performs all 10,635 native capability processes. These are follow-up design decisions, not claimed solved by release compilation. Only index migration 42 is added. Retain a verified pre-upgrade backup: the old image does not recognize that migration, so rollback requires its supported database restore path. PR production-image acceptance must pass before merge; cluster deployment and native Intel/API acceptance follow the release. No UI or screenshots. Compact evidence and source boundaries: [docs/performance-audit.md](docs/performance-audit.md).
test(performance): add guarded benchmark preparation and measured evidence
All checks were successful
CI / Quality (pull_request) Successful in 34m4s
CI / Build production (pull_request) Successful in 53m7s
5d06bb18e5
Sign in to join this conversation.
No reviewers
No labels
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
Wuast94/rustfin!3
No description provided.