Asked by:
UI unresponsiveness message shows in our custom extension

Question
-
installed our custom extensions like project template in VS, created project from that extension. After creation of project the report message on top "Visual Studio Stopped responding for 9 seconds. disabling the custom extension it might help "
Also shows in UnResponsive UI tab from help->Visual Studio Performance Manager
How to avoid this report while install our extensions? How to remove from Ui Unresponsive tab?
- Edited by PKarthick Tuesday, October 15, 2019 8:51 AM
- Moved by Jack J JunMicrosoft contingent staff Wednesday, October 16, 2019 8:33 AM
Tuesday, October 15, 2019 8:48 AM
All replies
-
The obvious answer is, don't make the UI unresponsive. ;)
Is your extension performing some long activity, either CPU bound or waiting for I/O or network? If so, then you need to run that as a background task, so you can free up the UI.
Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.
- Proposed as answer by Perry Qian-MSFTMicrosoft contingent staff Monday, October 21, 2019 1:40 AM
Tuesday, October 15, 2019 5:47 PM -
Hi PKarthick,
Welcome to the MSDN forum.
This step is actually VS automatically recognize your plug-in and then automatically categorize. Perhaps, as Tim says, does your plug-in need to load a large number of events, and if so, he will have to conflict with other vs events, resulting in a stuck-in unresponsive situation. There is also the possibility that your plug-in code has a lot of synchronization events instead of using asynchronous operations, resulting in overlapping VS load events and a lot of CPU, I/O blocking.
To solve it, you should optimize your code. For example, use more asynchronous operations to adjust the code.
>> You can refer to this document:https://docs.microsoft.com/en-us/visualstudio/extensibility/how-to-provide-an-asynchronous-visual-studio-service?view=vs-2019
Or you can use AsyncPackage to load extension.
For the unresponsive UI approach to diagnosis, you can refer to this.
Best Regards,
Perry
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com
Thursday, October 17, 2019 4:28 AM -
Hi Perry Qian
I refered this link https://docs.microsoft.com/en-us/visualstudio/extensibility/how-to-provide-an-asynchronous-visual-studio-service?view=vs-2019 and changed asynchronous VSpackage but UI Unresponisve message is not resolved.
Friday, December 6, 2019 6:06 AM -
Hi Perry Qian,
Any update on this, I need fix by today itself
Tuesday, December 10, 2019 11:20 AM -
Hi,
Any update on this.
Friday, December 20, 2019 8:44 AM -
I would hazard a guess that you should probably try and identify what was your extension is doing for that 9 seconds on the main UI thread. That's the key question you need to answer. The following articles might help get you pointed in the right direction:
How to diagnose extension performance
How to: Diagnose UI delays caused by extensions
Sincerely,
Ed Dore
Monday, December 23, 2019 9:02 PM -
Hi Ed Dore,
I checked with this link How to: Diagnose UI delays caused by extensions and diagnose problem plese find below screenshot
But I didn't find exact cause of delay from this diagnose. Please update this.
Regards,
Abishake
Thursday, January 2, 2020 10:13 AM -
Any Update on this?
Tuesday, January 14, 2020 6:46 AM -
Hi please update this for needful
Monday, April 6, 2020 9:15 AM