Skip to content

Hot Reload takes ~13 s to become Ready on every app relaunch, even with the DevServer already running #25530

Open

Description

@kazo0

Current behavior

Every time an app connects to a DevServer that is already running, Hot Reload takes 12–16 s to become Ready. This happens on desktop and on Android, even when the same project and target framework were connected a minute earlier.

From one DevServer session (DevServer 7.0.0-dev.2347, .NET 10, one app project, 16 launches of net10.0-desktop and net10.0-android). "Connect → Ready" runs from the app connecting to RequestHotReloadStatus answering Ready:

Target Launches Connect → Ready
net10.0-desktop 10 11.6–16.1 s
net10.0-android 6 13.4–14.3 s

The DevServer log shows the Hot Reload server side being set up again for each connection. In that session there were 19 Discovery: Registering Uno.UI.RemoteControl.Host.HotReload.ServerHotReloadProcessor lines and 19 Metadata updater initialized lines, for 16 launches through the App MCP plus the relaunches the agent made with adb. For one Android relaunch, times from the app connecting:

Time Log line
+0 s App Connected, Sending RequestHotReloadStatus
+3.5 s Hot-reload workspace restricted to 'net10.0-android' …
+3.5 s Hot-reload baseline of 'FieldCheck(net10.0-android)' re-pointed to …
+3.6 s → +11.9 s the compiler context resolving Microsoft.Interop.SourceGeneration, then Uno.UI and Uno.Xaml (presumably the generators running for the baseline compilation)
+13.8 s Observing '…' project directories for metadata changes, then RequestHotReloadStatusResponse

Expected behavior

When a relaunch of the same project and target framework connects to a DevServer that already has it loaded, Hot Reload should reuse what it has: the loaded workspace, and a baseline that only needs the documents changed since the last build. Ready should then come in a second or two instead of about 13 s.

Why it matters

  • The App MCP's uno_app_start and uno_app_restart wait for Hot Reload Ready before returning, on purpose (unoplatform/uno.app-mcp#187), because edits made before Ready are dropped.
  • So every relaunch an agent makes pays the full warm-up: at 16 launches in a session, about 3.5 minutes of waiting.
  • On desktop the warm-up is two thirds of a 20 s restart. The same wait hits anyone who relaunches from the IDE while the DevServer keeps running.

Notes

  • I haven't profiled which part dominates. The log suggests most of it is the baseline compilation with source generators (+3.6 s to +11.9 s), and the workspace load before it (+3.5 s).
  • When the app was rebuilt with source changes, the baseline has to follow the new build output. Reusing the workspace and updating the compilation incrementally keeps that correct, where caching the old compilation as is would not.

Environment

Uno.Sdk 7.0.0-dev.81, Uno.WinUI.DevServer 7.0.0-dev.2347, .NET SDK 10.0.400, Windows 11; Android emulator API 36.

Activity

  1. added
    kind/enhancement
    on Oct 16, 2026
  2. self-assigned this
    on Oct 16, 2026
  3. added
    area/hot-reload
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/hot-reloadarea/performancekind/enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions