microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.85k stars 328 forks source link

Prelaunch support like uwp apps in WinUi3 #3047

Open techyrajeev opened 2 years ago

techyrajeev commented 2 years ago

Startup performance of UWP apps on desktop device family devices is quite improved by proactively launching the apps that users use most often in the background.

is there anything like that supported in WinUi3?

/// <summary>
/// This method should be called only when the caller
/// determines that we're running on a system that
/// supports CoreApplication.EnablePrelaunch.
/// </summary>
private void TryEnablePrelaunch()
{
    Windows.ApplicationModel.Core.CoreApplication.EnablePrelaunch(true);
}

Also mentioned that

Performance considerations Today in version 1.0 of Windows App SDK, launch speeds, RAM usage, and installation size of WinUI 3 apps are larger/slower than seen in UWP. We are actively working to improve this. We will have more information to share in the future.

Are there any guidance for moving to WinUi3 for production ready apps or is it still not matured enough as UWP? https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/migrate-to-windows-app-sdk/what-is-supported

JaiganeshKumaran commented 2 years ago

I doubt enabling prelaunch for WinUI 3 apps, which are Win32 desktop apps, would be a good idea (at least for now) since desktop apps don't get suspended and resumed. Prelaunched UWP apps essentially got suspended so the app didn't slow down your computer, but still load certain things into memory that could potentially slow down app launch times if the app was terminated and reopened very often.

You should probably ask this in the AppSDK repo though as it's a system feature and not a feature of the WinUI framework.