Repository navigation
perf(gpu): overlap font and launcher setup with GL context creation - #81
Merged
Merged
Conversation
Every open built the fonts and, for the native frontend, the launcher core (app discovery, history, scores) on the main thread before creating the event loop, window and GL context, although neither is needed until the cell renderer and the first paint. Both now run on worker threads (`hyprburst-fonts`, `hyprburst-core`) through a small std-only `Pending<T>`, joined in `GlState::new` just before the renderer is built and in `resumed` before the first paint. A missing font still exits with the same message, now after the window exists. Interleaved A/B against main (n=30 per cell): native first-content p95 drops 3.7-12.6 ms in performance and 5.2-6.2 ms in balanced; Rio is within noise. With an empty font cache the fontconfig lookup now overlaps GL setup (native ~115 -> ~84 ms). docs/hotpath-findings.md records the results, including why the balanced-vs-performance ratio (NUKE-115) is still unsettled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NUKE-112. Every open built the fonts and, on the native frontend, the
LauncherCore(app discovery, history, scores) on the main thread before it created the event loop, window and GL context. Neither is needed until the cell renderer is built and the first paint happens. NUKE-111 reduced fonts to about 1.5 ms, so the scope was widened to cover all CPU work that runs before GL setup.Changes
src/gpu/startup.rs: a std-onlyPending<T>that runs work on a named thread. The firstget()joins it; a panic becomes an error.runandrun_riostartresolve_fontsonhyprburst-fonts, andrunalso startsLauncherCore::newonhyprburst-core, before the event loop is built. Fonts are joined inGlState::newjust beforefont_metricsandCellRenderer::new. The core is joined inresumed, before the first redraw.docs/hotpath-findings.mdmarks finding 2 fixed and gains an "After NUKE-112" section.Results
Interleaved A/B against
main(ed14bcb), 30 cold + 30 warm opens per cell. First-content p95, in ms:Validation
cargo fmt --check.-D warnings, default features and--all-features.cargo test --all-targetswith default,hotpathandhotpath-allocfeatures: 327 / 328 / 328 passed, 4 newPendingtests.resolve_fonts,LauncherCore::newanddiscover_appson the worker threads.--measureexits normally.