Hey folks, I'm from the Visual Studio team and our performance telemetry has caught an issue in this extension where it is causing Visual Studio unresponsivess by consuming large number of thread pool threads in the wild.
Over the past 90 days, we've captured 14 instances of this, with an average of 37 threads, but upwards of 269 threads.
In one of the dumps we captured, I see that the following stack is consuming 269 threads trying to retrieve UserLocalDataPath.
ntdll.dll!ZwWaitForMultipleObjects() Line 907 Unknown
KERNELBASE.dll!WaitForMultipleObjectsEx(unsigned long nCount, void * const * lpHandles, int bWaitAll, unsigned long dwMilliseconds, int bAlertable) Line 1551 C
[Managed to Native Transition]
mscorlib.dll!System.Threading.ManualResetEventSlim.Wait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
mscorlib.dll!System.Threading.Tasks.Task.SpinThenBlockingWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
mscorlib.dll!System.Threading.Tasks.Task.InternalWait(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) Unknown
mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.GetResultCore(bool waitCompletionNotification) Unknown
[Frames below may be incorrect and/or missing, no binaries loaded for Microsoft.VisualStudio.Shell.UI.Internal.dll]
[Native to Managed Transition]
msenv.dll!CThreadAwareServiceProvider::QueryService(__VSTASKRUNCONTEXT taskPriority, const _GUID & guidService, const _GUID & riid, void * * ppv) Line 553 C++
msenv.dll!CThreadAwareServiceProvider::QueryService(const _GUID & guidService, const _GUID & riid, void * * ppv) Line 342 C++
[Managed to Native Transition]
Microsoft.VisualStudio.Shell.Framework.dll!Microsoft.VisualStudio.Shell.ServiceProvider.QueryService(System.Guid guid, System.Type serviceType, bool setShellErrorInfo, out object service) Line 238 C#
Microsoft.VisualStudio.Shell.Framework.dll!Microsoft.VisualStudio.Shell.ServiceProvider.QueryService(System.Type serviceType, bool setShellErrorInfo, out object service) Line 144 C#
Microsoft.VisualStudio.Shell.Framework.dll!Microsoft.VisualStudio.Shell.ServiceProvider.GetService(System.Type serviceType, bool setShellErrorInfo) Line 110 C#
Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.Shell.Package.GetService(System.Type serviceType) Line 1046 C#
Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.Shell.AsyncPackage.GetService(System.Type serviceType) Line 1196 C#
Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.Shell.Package.GetRegistryRoot() Line 926 C#
Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.Shell.Package.UserLocalDataPath.get() Line 172 C#
doki-theme-visualstudio.dll!doki_theme_visualstudio.LocalStorageService.GetAssetDirectory() Unknown
doki-theme-visualstudio.dll!doki_theme_visualstudio.AssetManager.ConstructLocalAssetPath(doki_theme_visualstudio.AssetCategory assetCategory, string assetPath) Unknown
doki-theme-visualstudio.dll!doki_theme_visualstudio.AssetManager.ResolveAssetAsync(doki_theme_visualstudio.AssetCategory assetCategory, string assetPath, string assetSource, System.Func<string, string, System.Threading.Tasks.Task<string>> resolveAsset) Unknown
doki-theme-visualstudio.dll!doki_theme_visualstudio.AssetManager.CachedResolveAsync(doki_theme_visualstudio.AssetCategory assetCategory, string assetPath, string assetSource) Unknown
doki-theme-visualstudio.dll!doki_theme_visualstudio.AssetManager.ResolveAssetUrlAsync(doki_theme_visualstudio.AssetCategory assetCategory, string assetPath) Unknown
doki-theme-visualstudio.dll!doki_theme_visualstudio.AssetManager.ResolveAssetUrl.AnonymousMethod__0() Unknown