Microsoft-ui-xaml: UWP app launches very slow with many assets

Created on 1 Apr 2020  ·  3Comments  ·  Source: microsoft/microsoft-ui-xaml

Describe the bug

UWP app launch length is proportional to the number of assets included in the project (e.g. images with Build Action set to _Content_). Even for a simple blank page, which does not do anything, just having many assets present in the application package causes the app to load extremely slow - while the code is not touching them at all.

Steps to reproduce the bug
Steps to reproduce the behavior:

  1. Create a blank app
  2. Launch it - observe it starts up almost immediately
  3. Add 1000 small images in the Assets folder (even icons are enough)
  4. Launch app - it may now take even 20 seconds to launch

For better convenience, I have created a simple repro here on GitHub. It contains two apps - one is simple blank UWP app without any assets, second is a blank UWP app with many image content assets (which are however not used at all.

Expected behavior

When app does not use the content files in any way, they should not affect the launch time of the app (as the files are already deployed with the package, so the app should not manipulate them on start).

Screenshots

_Profiler output_

Notice the profiler shows all the launch time spent in Window Resized.

Profiler results

During debugging, you can see there is almost no CPU nor RAM activity during this wait time.

Version Info

NuGet package version: none required, classic UWP is sufficient


| Windows 10 version | Saw the problem? |
| :--------------------------------- | :-------------------- |
| Insider Build (xxxxx) | Yes |
| November 2019 Update (18363) | Yes |
| May 2019 Update (18362) | Yes |
| October 2018 Update (17763) | Yes |
| April 2018 Update (17134) | |
| Fall Creators Update (16299) | |
| Creators Update (15063) | |


| Device form factor | Saw the problem? |
| :-------------------- | :------------------- |
| Desktop | Yes |
| Mobile | Yes |
| Xbox | |
| Surface Hub | |
| IoT | |

Additional context

Noticed this long ago with my app which has a lot of content icon images, but now I finally found out what is the root cause of it launching this slow.

area-Performance needs-triage needs-winui-3 team-Reach

Most helpful comment

@MartinZikmund You have the correct repo :). With WinUI3 the platform bits are being moved out of the OS. So we can track this issue here. Thanks for reporting.

All 3 comments

@Austin-Lamb @bartekk8 The repro is with just the platform bits (no winUI).

@ranjeshj That is true, it would not matter if I added Microsoft.UI. Unfortunately there is no better place to report UWP issues (that would be seen by the developers), that's why I posted the problem here. I will repost it on Windows Feedback too, but I am not sure it will reach the developer team from there.

@MartinZikmund You have the correct repo :). With WinUI3 the platform bits are being moved out of the OS. So we can track this issue here. Thanks for reporting.

Was this page helpful?
0 / 5 - 0 ratings