Skip to content

Significant performance overhead in WinRT API calls (ApplicationData, Package.Current) #6223

@ekalchev

Description

@ekalchev

Describe the bug

I am seeing unexpected latency when calling standard WinRT APIs within a WPF application (Desktop Bridge/MSIX) using Windows App SDK 1.8.

Environment:
CPU: 12th Gen Intel i9
RAM: 64GB
Framework: Microsoft.WindowsAppRuntime 1.8

Observations:
Using both a profiler and Stopwatch verification, I’ve found that calls to ApplicationData.Current.LocalCacheFolder and ApplicationData.Current.GetPublisherCacheFolder consistently take ~25ms to execute.
Furthermore, these results do not appear to be cached internally; calling them multiple times results in the same 25ms delay per call. Other APIs show similar overhead:
Package.Current.InstalledLocation: ~15ms
ApiInformation.IsTypePresent: ~15ms
On high-end hardware, 15–25ms for a property access is extremely high. Is this expected behavior?

Steps to reproduce the bug

Just call any of those method and measure them with stopwatch

Expected behavior

No response

Screenshots

No response

NuGet package version

None

Packaging type

No response

Windows version

No response

IDE

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

area-ApplicationDataTopics related to ApplicationData APIs in the Microsoft.Windows.Storage namespacearea-PackageManagementMSIX deployment technology (eg PackageDeploymentManager)

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions