Replies: 1 comment 3 replies
-
I love this idea. Perhaps @AArnott knows of any patterns we can include in the analyzers. Personally, I handle this manually. Use fire and forget when I don't care about waiting for the results. This seems to be effective, but I'm not sure it is best practice. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It's depressing and frustrating when the yellow info bar of shame says that Visual Studio is running slow (or froze/stopped responding for N seconds) because of an extension that you're written.
I'm aware of the VS Threading cookbook but I still have issues.
When starting out with extension development it would be great if it was easier to avoid common problems in this area and "fall into the pit of success."
The threading analyzers are good at indicating when it's necessary to switch to the UI thread to use specific classes or methods, but this can quickly lead to switching to the UI thread at the start of method or extension activation points and never leaving.
It would be nice if there was a way (another analyzer perhaps) to highlight when working on the UI thread when the code doesn't need to be there. This would be a compliment to the existing analyzer that says when switching to the UI thread is necessary.
However, I'm aware that repeatedly switching between threads can bring its own issues and also impact performance. Is there a better way?
What do others do to ensure being performant and off the UI thread as much as possible?
And, what else can be done to improve things? (other than wait for v17)
Beta Was this translation helpful? Give feedback.
All reactions