You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Startup: every font variant in the manifest is preloaded before first frame #24079
A full family declares dozens of variants. Uno.Fonts.OpenSans ships 32 TTF faces (Condensed, SemiCondensed, every weight, every italic). On WebAssembly each face is an individual HTTP request on the startup path.
Proposal: preload only the variants likely to be used before the first frame, and let the rest load on first use, with a FeatureConfiguration knob to control the selection.
Why is this needed? 🤔
Measured on a blank Uno Skia WASM app (Uno.Sdk 6.6.42, net10.0-browserwasm, UnoFeatures=SkiaRenderer), published -c Release and served with brotli over a cold browser context:
37 font requests, 2.62 MB brotli are issued at startup.
Splash removal is chained behind the font preload task, so those requests gate perceived startup: first GL draw lands at ~870 ms, the last font at 1 026–1 215 ms, and the splash clears at 1 141–1 306 ms.
An equivalent Avalonia Browser app issues zero font requests — its default font ships as a managed resource inside Avalonia.Fonts.Inter.wasm and arrives in the normal parallel assembly batch.
On a shaped 20 Mbps link the same app reaches first frame at 4 524 ms versus Avalonia's 2 499 ms; total transfer is 11.87 MB versus 4.79 MB, of which the fonts are the second-largest single contributor.
Full measured teardown and method: specs/056-wasm-skia-startup-performance/spec.md (branch dev/mazi/wasm-startup-perf).
Renderer 🎨
Skia
For which platforms 📱💻🖥️
WebAssembly primarily; the change is renderer-agnostic and also reduces startup work on other Skia targets.
Anything else we need to know? 💬
This covers only the preload half of the problem — the 32 faces are still deployed. Trimming what Uno.Fonts.OpenSans ships by default is separate follow-up work.
Activity