Sometime either since updating to the latest VS2019 (16.3.9) or updating to the latest Coderush, bringing up the refactorings menu has become painfully slow, often taking the best part of a minute. During this time it will show "Gathering Suggestions", then this will disappear, reappear for maybe 5 to 10 seconds, after which the refactoring menu will appear. After that it will be okay for a while, then happen again, possibly after certain code changes.
I've recorded some performance data which illustrates the problem. I opened VS2019 and my solution. Initially I was unable to reproduce the problem. I then made a code change, selected a block of code, and asked for the refactoring menu, at which point the problem manifested. I'd also point out that this time I was selecting a block of code, but the context seems to vary - recording these logs was triggered by it happening when clicking in a method name so that I could use codrerush to rename it.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Kevin,
Thank you for contacting us and providing the log files.
We have researched them and found that UI thread is hanging while collecting suggestions.
It also seems like the "Pull Member Up" code action may be the cause of the issue.
To help us research this issue execute the following steps:
Editor\Visual Basic\Code Actions
If this does not help, we will prepare a build with additional logging that allows us to detect which code actions lead to the issue.
I look forward to your results.
Thanks Pavel, I will do that now. It's an intermittent issue (I've not experienced it today), so I'll run until the end of tomorrow with this change to give it time to show up.
Thank you for the update, Kevin. I will be looking forward to hearing from you.
I've not had any repeat of the problem since disabing that code action, and I've been doing some significant editing. I think it's safe to say you've identified the problem
Hello Kevin,
Thank you for the update. I am happy to hear that this issue disappeared after disabling the "Pull Member Up" code action.
We also can make further research if it is possible for you to provide us with the file or code sample where the issue is reproducible (when "Pull Member Up" is enabled).
With CodeRush 19.2.8 and VisualStudio.16.Release/16.4.5+29806.167 i have the same problem but disabling Pull Member Up" code action the problem still remain. In my case the "Gathering Suggestions" remain opened for 40 seconds.
Hello Simone,
I've created a separate ticket on your behalf (T864868: Coderush very slow gathering suggestions (best part of a minute!)). It has been placed in our processing queue and will be answered shortly.
For what its worth, I've been finding it intermittently slow again for a while, but I've not really had time to raise a support request. It really needs to be more or less instant, but at the moment its often slow enough that I find myself wishing I'd just done whatever refactoring I'm looking for manually :-(
Kevin,
I see that you joined the discussion at Coderush very slow gathering suggestions (best part of a minute!). Let's continue it here, because the root cause of the issues might be different than in Simone's case and we want to investigate and fix both of these cases.
I assure you that we treat performance seriously and every release contains fixes and enhancements in this area. The 19.2.8 release contains the first version of the Performance Monitor, which we believe can be useful in diagnosing issues related to performance. To help us better understand why you are still experiencing these delays, please do the following:
I am looking forward to hearing from you.
Thanks Przemyslaw, sounds like a good addition. I've enabled it now, but of course the menu is appearing instantly now. I'll keep checking, just need to run VS as admin each time I use it!
Kevin,
Thank you in advance for your cooperation.
Well, that's a bit annoying. I just needed to apply a remove unused parameter refactoring, and observed the suggestions menu taking a long to appear. I tried to start the performance trace (in the already open Performance Monitor) but was unable to access it whilst the gathering suggestions message was on screen. This makes it very difficult to capture a useful trace for you!
Kevin,
In this case, cancel displaying the lightbulb menu, start tracing the performance, move the caret one character left or right, and try to invoke the lightbulb menu again. If the delay is somehow connected to how CR is processing your code and is not a result of a delay inside the Roslyn engine in Visual Studio, then it should be reproducible.
Okay, will try that next time, thanks
Kevin,
Just a follow-up: we rewrote the "Pull Member Up" refactoring in CodeRush 19.2.9. Now, it provides much better performance. You can now enable it.