Bug #97934 | UI delay in mysql.visualstudio.dll MySqlQuickInfoController.OnTextViewMouseHover | ||
---|---|---|---|
Submitted: | 9 Dec 2019 22:55 | Modified: | 2 Jun 2021 17:15 |
Reporter: | Christian Gunderman | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Visual Studio Integration | Severity: | S5 (Performance) |
Version: | OS: | Windows | |
Assigned to: | CPU Architecture: | Any |
[9 Dec 2019 22:55]
Christian Gunderman
[17 Dec 2019 17:12]
MySQL Verification Team
Thank you for the bug report and suggestion fix.
[7 Apr 2020 13:04]
Reggie Burnett
Thank you for the bug report and suggestion. Sounds like the right approach. I'll discuss with the team responsible and see when we can get this implemented. Thanks!
[19 Jan 2021 5:55]
David Kean
Hey folks, I'm from the Visual Studio performance team from Microsoft. This is the 12th worst UI delay across all Visual Studio sessions by severity. 25% of folks that hit this will see Visual Studio become unresponsive for at minimum 3.5 seconds, but sometimes up to 20 seconds. This has resulted in over 10,700 missed mouse & keyboard events* just in the past 28 days. The APIs that this code path is calling have been deprecated and will likely be removed in a future version of Visual Studio. Moving over the asynchronous APIs will have a great impact on the user experience that your customers have with your extension and will future proof your extension for releases to come. * This is where the user click or type something in Visual Studio and it was not responding because of this delay.
[21 Jan 2021 0:18]
Jose Ramirez Ruiz
Hello David, thank you for the additional info. This is Jose Ramirez from the Oracle team and I've recently started reviewing this bug. I've been able to validate that the MySqlQuickInfoController.OnTextViewMouseHover method is being called on multiple occasions when using a text editor (coding on source files from a proyect) and/or clicking/right clicking on elements in the UI (e.g. Solution Explorer items and right clicking on the text editor). Having said that, I'm not seeing any long-standing delays. Is there a specific use-case in which you are able to consistently reproduce the long-standing delay that will help to ensure that the changes that I will be making actually fix the issue? Thank you.
[21 Jan 2021 0:54]
David Kean
Unfortunately, I don't have a repro, we have just gathered this from our telemetry data that shows these delays in real world usage. The long running isn't showing up in the data, so I can't tell you whereabouts the slowness is. Regardless, moving the async API called out by Christian will avoid needing to block the UI thread to calculate the data to show in Quick Info.
[1 Feb 2021 1:38]
Jose Ramirez Ruiz
I see, thank you for the additional input. We'll proceed to upgrade to the Async Quick Info API nonetheless. Having said that, if we were to provide a package containing the fix, would it be possible for your team to assist us with running your tests against said package? If that is not possible, is there some setup that you can kindly provide/recommend that we could implement on our side to run similar tests? Thank you.
[11 Feb 2021 16:36]
Jose Ramirez Ruiz
Hello David/Christian Is there any input you can kindly provide regarding my last comment? Thank you.
[13 Feb 2021 1:57]
Christian Gunderman
The bug has no known consistent repro with the existing MySql Extension codebase. We know of it from automated ETW trace collection instrumentation which has reported these UI delays as frequently occurring for customers. You can potentially simulate the UI delay by adding a Thread.Sleep() call within IAsyncQuickInfoSource.GetQuickInfoItemAsync(). In the obsolete, IQuickInfoSource variant of this API, the call is made on the UI thread, and would cause a UI delay. The new async API is called from a background thread, however, and should not cause a UI delay in any case.
[26 Mar 2021 21:41]
Christine Cole
Fixed as of the upcoming MySQL for Visual Studio 1.2.10 release, and here's the proposed changelog entry from the documentation team: The performance associated with showing tooltips in MySQL for Visual Studio now is enhanced by switching to (async) Quick Info for UI thread affinity. Thank you for the bug report.
[2 Jun 2021 17:15]
Christian Gunderman
Hello, thank you for taking action on this issue. It looks like 1.2.10 is not yet released. Is there an ETA for its eventual release? VS team is tracking this UI delay as a high impact responsiveness issue.