Comments (4)
The problem is that UserLocalDataPath under the covers performs a hidden thread switch to the UI thread, in times of high UI thread usage (such as solution load), these calls can back up waiting for access, consuming large amounts of thread pool threads in the meantime. This prevents other features from using these threads.
In the above dump, we had 269 threads (ie calls) backed up all waiting for access to the UI thread. A typical VS instance should have only as many thread pool threads as there are logical CPUs (4 on a 4-core machine, 8 on a 4-core with hyper-threading for example), but this extension is consuming 269 of them (!), at which point VS would have slowed to a crawl and would very unpleasant to use.
By caching and reading UserLocalDataPath once upfront, this thread switch is avoided and removes the backup of threads.
Towards the top of the stack, you can see a call to CThreadAwareServiceProvider::QueryService, that is performing the thread switch to grab a "service" from the UI thread, so its not network related.
from doki-theme-visualstudio.
Thanks, @Unthrottled looks good.
from doki-theme-visualstudio.
Are you sure that is the issue? (not a visual studio/dot net wiz)
Is calling UserLocalDataPath on the AsycPackage while not on the UI thread the actual issue? So just capturing UserLocalDataPath
from the package while in the InitializeAsync
will fix it? I suppose this is a dead lock kind of scenario? (tried reading the stack trace, assumed lower is higher up in the call chain, and the highest is the active method stuck)
I would have guessed that the issue might be slow network speeds, because the extension downloads assets from the web to be used by the extension. Which is why I was sure to not run that download work on the UI thread. So that might be causing the issue because it tries to get the path while outside the UI thread? Perhaps it might be because it takes forever for it to download or it could be like you said and is an issue with deadlock or something.
Any insights are welcome.
from doki-theme-visualstudio.
Thanks for bringing this to my attention. Pretty sure I addressed the issue. Ran the code that accesses UserLocalDataPath
on the UI thread, captured it for reuse later on.
from doki-theme-visualstudio.
Related Issues (20)
- Missing tab highlight in NuGet Package Manager HOT 1
- Wrong color of NuGet Package Manager Console
- Missing hover item highlight in search menu HOT 1
- Text on non-code editor windows with overwritten background doesn't respect Dark/Light setting HOT 4
- "Tab" title background color. HOT 2
- Background color in SQL editor doesn't match theme HOT 6
- Sticker sizing when using ctrl+scroll HOT 3
- Not compatible on 16.11.17. Please update HOT 1
- Wallpaper does not work if wallpaper opacity set between "-0.9" and "0" HOT 1
- Wallpaper colour changes HOT 5
- How to add own sticker and wallpaper? HOT 1
- Blurry stickers HOT 7
- Scroll causes sticker glitch
- The latest version theme colors adapted to VisualStudio 17.6.5 Issue reports: HOT 2
- Popup window border color does not match theme background color
- LocalAssetService using unprotected Dictionary<TKey, TValue> causing threads to enter infinite loop
- Possible to Modify Color Settings? HOT 1
- Unreal Engine Output Log Text Color is not visible with a Dark Theme
- The code in StickerAdornment leaks every text view it attaches to
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from doki-theme-visualstudio.