What is the "gap" and how do I eliminate it?

Brass Contributor

I have an MSIX installed via App Installer. I've got it working, but sometimes after an update there is a very long pause before the app is relaunched.


In the Event Viewer there is a helpful breakdown of where the time during an install/upgrade operation is spent. Unfortunately almost all the time is allocated to something simply called "Gap", strongly implying that during this pause the App Installer is in fact doing ... nothing. Example:


  1. Performance summary of Deployment Add operation on Package DemoApp_3.10.0.0_x64__49jahnq5qzr1m:
  2. Overall time: 32875 ms
  3. Enqueue cost: 359 ms
  4. Dequeue delay: 0 ms
  5. Bundle processing cost: 0 ms
  6. Indexing cost: 16 ms
  7. Resolve dependency cost: 16 ms
  8. Check approval cost: 125 ms
  9. Evaluation cost: 187 ms
  10. Hardlinking evaluation cost: 31 ms
  11. Stage required cost: 500 ms
  12. Flushing and closing files cost: 0 ms
  13. Machine register cost: 0 ms
  14. Stage user data cost: 0 ms
  15. Gap: 31453 ms
  16. Registration cost: 47 ms
  17. Gap: 31 ms
  18. Repository commit transaction cost: 79 ms
  19. Gap: 46 ms
  20. Data flush cost: 16 ms
  21. Post DeStage repository commit transaction cost: 0 ms
  22. Remaining cost: 0 ms

This is rather puzzling, to say the least. Most of the categories are self explanatory, but can any MSIX experts explain why there is an apparently pointless 31.4 second pause after "Stage user data" and "Registration"? And, does anyone know how I can get rid of this "gap"?

4 Replies

@MikeH Thank you for your question. If you reproduce the behavior and file a bug in the Feedback Hub app, someone on our team can take a look at it. You can file it under "Install and Update" -> "App installation issues".



@Aditi_Narvekar / @MikeH what was the end result of this, as I have similar experiences with the Package Analyzer stalling after apparently successfully installing the MSIX package.


@GrahamGBI think we concluded that it's some lazy attempt to avoid a race between the updater and the app shutting down, when it's detected that the app is still running. I run a company that makes packaging tools and we solved this by taking more control over the update process ourselves using the API. 


Hydraulic Conveyor makes MSIX packages but also a small Win32 installer/updater exe that drives the install and update process itself. This lets us work around bugs in Windows. 

Hi @GrahamGB

Is this delay in launch happening only for this specific package or other packages as well?
You can try to uninstall the package and then Analyze Package again using MSIX Packaging tool. 

Once you do this, please collect and share the logs using Get-AppxLog (Appx) | Microsoft Learn for any error warnings that point to the cause of delay.