[DevExpress Support Team: CLONED FROM T562433: Roslyn Performance Problem]
Artem, sorry to hijack another users thread, but I believe we too as a business are suffering these kinds of issues. However in our case it's a solution of 56 projects, we have tried turning off most of the intensive helpers and threads but still suffer these issues. In some cases the memory jumps wildly (as previously reported by my manager Richard Kerry) as well as constantly using up CPU resources.
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.
Hi Mark,
We are concerned to hear that you faced this issue.
Please install the following build in which we have solved some issues with Visual Studio editor slowdowns: DevExpress.CodeRush.Roslyn-17.1.8.17279.vsix and check whether it resolves the issue on your side. If the issue persists then provide us with CodeRush settings that are located by default in the following folder:
*%appdata%\CodeRush\Settings*
We look forward to hearing from you.
Alexander, many thanks for creating this ticket on behalf of me, I will certainly try the aforementioned build and get back to you with my findings.
You are welcome, Mark. We look forward to your results.
Alexander, I am afraid to report, that now having gone back to our main solution, I am now seeing the behaviour previously reported by my manager in regards to the CPU + Memory Usage.
My CPU is constantly at around 7% whilst debugger is paused. And the memory is jumping anywhere from 1.2GB -> 2.2GB.
As a result, here is my current settings to aid in further investigation.
I have also requested a hotfix for T559199 in relation to this, as I'd previously reported some of the issues I've been facing to a different colleague.
Looks like, this hotfix i've downloaded includes these changes. As a result I've now unticked the following option within "Static Code Analysis -> "Include diagnostics from Analyzers Library into the Visual Studio background analysis".
This seems to have made Visual Studio behave better. However I have noticed something which would be worthy of investigation, if you kick of Code Issue Analysis on one project, but then kick off another project for Code Issue Analysis, you aren't cancelling the previous task, and you could get into the stage that Visual Studio runs out of memory, especially if this was done at a Solution Level.
Maybe worthy of adding additional logging, as to which set of logging entries are for which request, as well as when they have started and completed.
Having reviewed the logging further, I thought it may be worthy to bring your attention to a few items:
* Questions are being raised as to whether "invalid" or old tasks are not being cancelled. For example, say in a code base of 56 projects your making changes across 3-4 projects of the code base. It doesn't appear to cancel the Analysis, unless specifically told to via the cancel button. Therefore I suspect this may be an area of the code to review, in case this is causing increased CPU and Memory Usage
* The "DevExpress.CodeAnalysis.VisualBasic.Diagnostics.UnreachableConditionAnalyzer" in some cases on some of our sample projects is taking around 5-6 minutes, is this expected?
* The "DevExpress.CodeAnalysis.VisualBasic.Diagnostics.UnneccessaryConditionAnalyzer" in some cases is taking around a minute, is this expected?
I realise questions on timings are subjective and subject to the number of projects, and the complexity thereof, including how much interlinking is involved.
Attached is a log file, of the start of a solution wide analysis - should this prove useful.
Hi Mark,
Thank you for providing settings, log files and detailed explanations. Please give us some time to examine this information.
>I have noticed something which would be worthy of investigation, if you kick of Code Issue Analysis on one project, but then kick off another project for Code Issue Analysis,
>you aren't cancelling the previous task, and you could get into the stage that Visual Studio runs out of memory, especially if this was done at a Solution Level.
It would be helpful if you provide us with a screencast that illustrates this behavior in action. For instance, you can capture it using the free Jing tool from TechSmith.
Alexander, of course I hope this isn't information overload, but rather gives some insight as to some areas that may require further investigation, in turns of the screen cast, what would you want a screen cast of? The Visual Studio window and the Task Manager?
Here is a video captured via Jing which I hope illustrates this.
I instigated a solution wide analysis, and then a project analysis.
As you will see, despite it being for the same solution, both analysis sessions are executed.
Hi Mark,
Thank you for providing the screencast. It has explained the issue and we need to research how CodeRush should work in this scenario. Please give us some time for this.
Also, we have made some optimizations to improve CodeRush performance in the context of another ticket with a similar issue of high CPU usage. Please install the following build and let us know whether it has effect on your side: DevExpress.CodeRush.Roslyn-17.1.8.17285.vsix.
The same could happen if you were doing this at a project level. Dependant upon how the "background" analysis code has been coded, this could result in the behaviour being seen if the process was stalled or crashed. As mentioned previously it would be good to clarify in the log, what analysis segment was for which request. This may then illustrate further as to whether it is processing the same project multiple times.
Alexander, I have now managed to install that build you mentioned and will keep an eye and provide feedback.
On this special build, it appears as if the spellchecker quick action's are not functioning as expected. Having ran a solution analysis, and having reports of lots of mispelled words, right clicking on them (they are not being highlighted either) is not providing the spellchecker options i'd of expected.
I've attached a screenshot to provide further clarification.
Another thing that tends to make CodeRush exhibit the behaviour previously described, is when the clipboards changed, or you are copying and pasting items.
I've also noticed, that when a task crashes out, from say an InvalidCastException, this could also make the CPU + Memory Usage become unstable.
Attached is a log file, in case these crashes may not have yet been reported to you.
In addition to this, if during an analysis session, you start making changes, or alter the clipboard, it appears to "stall" the process.
Hi Mark,
Thank you for your clarification. Based on the information you provided, I have created two separate tickets on your behalf to process all your inquiries in the most efficient manner:
Spell Checker - Items with suggestions to correct misspelled word are missing in the light bulb menu
Visual Studio slows down on text editing and changing the clipboard when a code analysis session is active
Let's continue our discussion in the context of these threads.
Of course Alexander, I suspected you would do this, but thought I'd provide the feedback under this thread for continuity.
With regards to CodeRush for Roslyn, under what circumstances would we be expecting it to be monitoring the clipboard?
As I feel this may be related to the jumping in CPU + Memory Usage. Having copied and pasted a few times between solutions, it is now exhibiting jumping in CPU + Memory Usage.
Yet all the log file states is Information: ClipboardChanged
Ignore my latest comment, this appears to relate to having the Clipboard History setting ticked. Having enabled, then disabled Smart Cut + Copy (Creates Clipboard xml Setting File) and disabling Clipboard History it appears to behave better.
Another thing, that seems to get this behaviour to occur, is if you start correcting spelling mistakes, or adding items to the dictionary. Whether it's enough just to bring up the refactor window, or whether it is specifically spelling based modifications I will let you know.
Hi Mark,
Thank you for sharing your results with us. We look forward to hearing from you.
We have also examined the information you provided in the previous comments. The behavior when checking the Unreachable condition diagnostics takes much time, which is not expected. We have found the problematic part and will change it to improve this diagnostics performance. We are also going to correct the behavior with multiple running code issues analysis. We will inform you of our progress.
Alexander, many thanks for your latest update, I am glad you have managed to find the problematic section within the unreachable condition diagnostics, as well as also saying you will look into the behaviour when running multiple code issues analysis.
Hi Mark,
We have prepared a build that contains the Unreachable condition diagnostic improvements: DevExpress.CodeRush.Roslyn-17.1.9.17305.vsix. Please install it and let us know whether it affects your project.
The issue with multiple running code issues analysis is also solved in this build.
Alexander, thank you for this, I will download and let you know my findings.
Alexander, unfortunately with the hot-fixed build mentioned above, I am getting exceptions as part of the "Remove Unused Parameters Refactoring":
Error: Message: Specified argument was out of the range of valid values.
Parameter name: span
Error: Type: System.ArgumentOutOfRangeException
Error: Source: Microsoft.CodeAnalysis
Error: StackTrace: at Microsoft.CodeAnalysis.SyntaxNode.FindNode(TextSpan span, Boolean findInsideTrivia, Boolean getInnermostNodeForTie)
at DevExpress.CodeAnalysis.VisualBasic.Refactorings.RemoveUnusedParametersRefactoring.Context.<SetupInternal>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at DevExpress.CodeAnalysis.VisualBasic.Refactorings.RemoveUnusedParametersRefactoring.Context.<Setup>d__48.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at DevExpress.CodeAnalysis.VisualBasic.Refactorings.RemoveUnusedParametersRefactoring.<GetContextIfAvailable>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at DevExpress.CodeAnalysis.VisualBasic.Refactorings.RemoveUnusedParametersRefactoring.<RefactoringIsAvailable>d__23.MoveNext()
Mark, thank you for informing us and providing exception call stack. Please clarify how often this exception is thrown? Is this a single case or are there many these exceptions in log files? Also, it would be great if you provide us with full log file.
Of course, please see attached.
Thank you, Mark. Please give us some time to examine it.
Of course, should you require further info please ask :)
Hi Mark,
Thank you for your patience. We have added additional check to prevent the exception that is collected in your log file. The following build contains this change: DevExpress.CodeRush.Roslyn-17.1.9.17306.vsix. Please install it and provide us with new results of code analysis of your project.
Alexander, I've already downloaded this from another ticket of an issue I was also facing. I have now installed it and will provide any further feedback, should I encounter further issues.
The only thing I have noticed, is that when running analysis, the biggest killer for time is the UnusedMember Analyzer.
Mark, I suppose that you mean the following ticket: VS locks up on one program after Ver 17.1 install. Please note that the build from my previous post and the build from this ticket are different though they have the same name. The necessary change is included only in the build provided in the current ticket.
As for the Unused Member diagnostics, it requires most of resources during checking. We see that it takes much time in your project and will examine how to improve it. But in the general case, this diagnostics takes more time than other diagnostics.
Yes, I suspect because of the heavily chained and linked nature of our solution + projects. And oh okay, I will download the build you provided me a link to then.
But having said that, even if I disable the "Unused Members" option within the static code analysis section, the UnusedMemberAnalyzer is still being ran, is this expected behaviour?
And to give context with regards to the UnusedMemberAnalyzer. On one project alone I left it running for an hour and twenty minutes and was still yet to complete. I suggest that this may be broken in some way.
Hi Mark,
Please accept my apologies for the delayed response.
We tried to reproduce the issue with long time of checking Unused Member diagnostics, but our attempts were unsuccessful. We will add extra logging to determine what causes the issue on your side.
Since currently it is not possible to exclude the Unused Member diagnostic from code analysis, we are working on the code issues catalog that provides this capability. Please give us some time to prepare a build where the Unused Member diagnostic is excluded from code analysis.
Alexander, not a problem, I did wonder if this was going to be the case, and will await the build whereby this has been disabled or excluded from code analysis.
Alexander, is there anything else I can provide to be of further assistance in the meantime? Such as a perfview, or anything like that?
That build you've provided me appears to be broken, I am getting the following errors in a vs log I decided to open this morning.
Based off of this, I have decided to repair visual studio as I've noticed various entries which indicate a slightly corrupt install.
This was due to my ComponentModelCache becoming corrupt. I have also noticed, that if I run the analysis on a project containing NuGet packages, then it gets stuck or in a loop. Whereas when running against a project with no NuGet packages, it eventually completes.
I don't know if this information is useful or not.
Hi Mark,
Thank you for your patience.
We have prepared a hotfix where CodeRush code analysis considers options of detecting unused members: DevExpress.CodeRush.Roslyn-17.2.3.17324.vsix. Please install it and disable the "Search for unused members", "Search for empty event handlers" and "Search for possible System.NullReference exceptions" options.
Then run CodeRush code analysis and provide us with collected CodeRush log files.
>I have also noticed, that if I run the analysis on a project containing NuGet packages, then it gets stuck or in a loop. Whereas when running against a project with no NuGet packages, it eventually completes.
Regarding this issue, please check whether it persists with this hotfix.
Alexander, many thanks for you and your teams continued efforts, I have now installed the hotfix, and will provide you with a log file once code rush code analysis has been completed on the solution.
Alex, please see the attached log file as per your request. When I ran the analysis, I did also notice a series of issues being reported by the Analyzer which read as follows:
"Analyzer 'DevExpress.CodeAnalysis.VisualBasic.Diagnostics.AsyncAwait.TaskWaitAnalyzer' threw an exception of type 'System.NullReferenceException'"
I don't know whether this is something you may or may not have expected. This hasn't happened to every project though, only a select few within the solution.
I don't know whether this is something you may or may not have expected. This is being reported between the project nodes (in the code issues screen)
Hi Mark,
Thank you for providing the log file and additional information.
> When I ran the analysis, I did also notice a series of issues being reported by the Analyzer which read as follows:
> "Analyzer 'DevExpress.CodeAnalysis.VisualBasic.Diagnostics.AsyncAwait.TaskWaitAnalyzer' threw an exception of type 'System.NullReferenceException'"
> I don't know whether this is something you may or may not have expected.
It is unexpected behavior caused by an issue in one of our new diagnostic tools. We have made changes that should fix it and have prepared a special build: DevExpress.CodeRush.Roslyn-17.2.3.17325.vsix. Please check to see whether it solves it on your side.
Also, based on your last log file, we see that the issue with long time checking the Unreachable condition diagnostic has been solved.
Alex, thanks for getting back to me in regards to this, I suspected that it wasn't expected but wasn't sure. And yes I must admit, since disabling those options, it was drastically quicker at running the solution wide analysis. Particularly within the unreachable condition diagnostic it seems.
I will now download and install the new hotfix, perform the same steps and let you know of my findings.
Alex, having downloaded and installed the new hotfix, and having re-ran solution wide analysis, I can now confirm that that error is no longer being presented.
Mark,
Thank you for informing of your results. I'm happy to hear that the issue is fixed. Feel free to contact us if you have any difficulties.
The only thing, that may require further investigation is the length of time the unusedmember analyzer takes up. However, in the meantime I'll have this particular option disabled and continue evaluating the effectiveness and usefulness of coderush for roslyn.
Mark, the task to optimize the unused member analyzer performance is in our backlog. We will notify you of our progress in the context of this ticket.
Okay, understood Alex, if as part of that when it's reached, further info is required or anything then I'm more than willing to provide that if possible.
Thank you for bearing with us, Mark. Your cooperation is appreciated greatly.
Alexander, my colleague Richard Kerry, has also now upgraded to the latest version of CodeRush for Roslyn, and is encountering issues which I am not seeing, when working on the same solution. Particularly it appears as if a re-scan is initiated once a solution rebuild has taken place. As once this occurs, both CodeRush and Roslyn are showing CPU time being used.
It is paramount now, that more logging is added to the coderush logs, to give a better indication of what it's doing, not just when its being asked to perform solution or project analysis, but also similar to CodeRush for classic, every change or event that has been captured by CodeRush and the actions performed thereof.
Otherwise, you leave us with no choice, but to for the time being not utilize CodeRush for Roslyn due to these resource contention issues previously described.
In relation to my previous colleague, please see the attached settings folder from his machine.
Hi Mark,
We are concerned to hear that your colleague faced this issue. Thank you for pointing this out and providing us with his CodeRush settings. Please give us some time to examine them. The performance issues have high priority for us and we will do our best to solve them.
Also, it would be great if you provide us with Visual Studio settings of your colleague and information about what extensions are installed on his side. For this, simply click the "Copy Info" button in the "Help -> About Microsoft Visual Studio" dialog and share this information with us.
Alexander, I appreciate that this is a high priority for DevExpress. He will have most likely provided these previously as part of his tickets regarding performance issues with CodeRush. However if you can't find these from his previous tickets, then I am more than happy to request these from him.
In regards to this, please find the attached information: Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02046
Installed Version: Professional
LightSwitch for Visual Studio 2015 00322-50350-10940-AA118
Microsoft LightSwitch for Visual Studio 2015
Microsoft Visual Studio Tools for Applications 2015 00322-50350-10940-AA118
Microsoft Visual Studio Tools for Applications 2015
Visual Basic 2015 00322-50350-10940-AA118
Microsoft Visual Basic 2015
Visual C# 2015 00322-50350-10940-AA118
Microsoft Visual C# 2015
Visual C++ 2015 00322-50350-10940-AA118
Microsoft Visual C++ 2015
Windows Phone SDK 8.0 - ENU 00322-50350-10940-AA118
Windows Phone SDK 8.0 - ENU
.NET Reflector Visual Studio Extension 9.2.0.117
Integrates .NET Reflector into Visual Studio to allow you to seamlessly debug into third-party code and assemblies, even if you don't have the source code for them.
Visit www.reflector.net for more information.
Copyright © 2009-2017 Red Gate Software Inc.
Application Insights Tools for Visual Studio Package 7.19.00411.1
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2015.1 14.1.21111.0
ASP.NET and Web Tools 2015.1
ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
For additional information, visit http://www.asp.net/
Azure App Service Tools v2.9.6 14.0.21111.0
Azure App Service Tools v2.9.6
Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.
Azure Data Lake Tools for Visual Studio 2.2.2100.0
Microsoft Azure Data Lake Tools for Visual Studio
Clang with Microsoft CodeGen 14.0.25516
Clang with Microsoft CodeGen
Common Azure Tools 1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
ConvertToDevExtremeCommand Extension 1.0
ConvertToDevExtremeCommand Visual Studio Extension Detailed Info
DevExpress.DeploymentTool 1.0
A useful tool for deploying DevExpress assemblies.
DevExpress.Win.LayoutAssistant Extension 1.0
DevExpress.Win.LayoutAssistant Visual Studio Extension Detailed Info
DevExtreme.Design 16.2.8
DevExtreme Visual Studio integration package
Extensions Monitor Extension 1.0
ExtensionsMonitor Visual Studio Extension Detailed Info
JavaScript Language Service 2.0
JavaScript Language Service
JavaScript Project System 2.0
JavaScript Project System
KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info
Microsoft .NET Core Tools (Preview 2) 14.1.21111.0
Microsoft .NET Core Tools (Preview 2)
Microsoft Azure Hive Query Language Service 2.2.2100.0
Language service for Hive query
Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools
Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.41104.6
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual Studio Process Editor 1.0
Process Editor for Microsoft Visual Studio Team Foundation Server
NuGet Package Manager 3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Office Developer Tools for Visual Studio 2015 ENU 14.0.23928
Microsoft Office Developer Tools for Visual Studio 2015 ENU
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Data Tools 14.0.61021.0
Microsoft SQL Server Data Tools
StopOnFirstBuildError 1.0
StopOnFirstBuildError
Stops a solution build immediately after a project has failed to build.
http://tech.einaregilsson.com/2011/01/06/stop-build-on-first-error-in-visual-studio-2010/
ToolWindowHostedEditor 1.0
Hosting json editor into a tool window
TypeScript 1.8.36.0
TypeScript tools for Visual Studio
Visual C++ for Cross Platform Mobile Development (Android) 14.0.25401.00
Visual C++ for Cross Platform Mobile Development (Android)
Visual C++ for Cross Platform Mobile Development (iOS) 14.0.25401.00
Visual C++ for Cross Platform Mobile Development (iOS)
Visual Studio Tools for Apache Cordova Update 10
Visual Studio Tools for Apache Cordova
Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
XtraReports package 1.0
XtraReports package
Here also is a screenshot of productivity power tools settings.
Hi Mark,
Thank you for providing additional information. Please give us some time to examine it more thoroughly.
Also, we have prepared a special build DevExpress.CodeRush.Roslyn-17.2.3.17328.vsix. In this build, some operations that CodeRush performs on build finishing are disabled. Please ask your colleague to install it and check whether it affects this issue.
Alex, of course, for now unfortunately my colleague has disabled CodeRush due to the issues previously described. I will download the special build and let him know and see what he wants to do in regards to this.
Alexander, I managed to get my manager to agree to install the special build you've prepared with certain features on build finishing being disabled. So far we have the following findings:
* Initial Solution Load was much improved, in terms of both CPU and Memory Usage
* CodeRush gets particularly upset and starts jumping in both CPU and Memory when you start to alter or modify the individual method signatures. In this particular case refactoring where the array specifiers are (originally was against the type, but now moved next to the name).
* When finishing a build, it does seem to have also improved both on mine and his machine(s) for the CPU and memory usage as a result of CodeRush not intervening.
I hope these initial findings prove useful to you and your team.
Some further findings:
* Opening 2 code pages fairly close together of 20,000 lines+ in each, can result in 2 CPU Cores being utilised, and memory usage exceeding the address space provided .
This is on my colleagues machine, with most importantly, the Static Code Analysis completely disabled. With settings as per what I provided you with previously.
In regards to latest comment, something we've noticed is that these projects are set to compile AnyCPU, whereas most other projects are set to x64. The reason for this is due to these being WinForms component projects which have to be visible and linkable in the WinForms designer.
Don't know if this helps any further or not, but thought it worth pointing out.
Hi Mark,
Thank you for informing us of your results and providing additional information.
* CodeRush gets particularly upset and starts jumping in both CPU and Memory when you start to alter or modify the individual method signatures. In this particular case refactoring where the array specifiers are (originally was against the type, but now moved next to the name).
We have changed the process of checking the "Declare…" menu availability because it took a long time and required a lot of resources in some cases. These changes are included in the following build: DevExpress.CodeRush.Roslyn-17.2.3.17332.vsix. Please check whether it affects this issue.
* Opening 2 code pages fairly close together of 20,000 lines+ in each, can result in 2 CPU Cores being utilised, and memory usage exceeding the address space provided.
It would help if you collect information about the performance on your machine in this case by using the PerfView tool from Microsoft and provide us with this information. For this, install this tool and perform steps shown in the screencast.
I suggest you upload the log files to our ftp. Use the following credentials:
Server: downloads.devexpress.com
User: UPLOAD
Password: HEREYOUARE
In regards to latest comment, something we've noticed is that these projects are set to compile AnyCPU, whereas most other projects are set to x64. The reason for this is due to these being WinForms component projects which have to be visible and linkable in the WinForms designer.
Thanks for this clarification. This configuration of the project should not affect CodeRush work and it seems that it is not related to the performance issue.
Alexander, in this particular case we didn't use the "Declare" menu but rather just did so manually, however we will install this latest hotfixed to see how we get on with it. In regards to your other point, I will download PerfView and provide you with the findings from that.
Mark, we greatly appreciate your cooperation and look forward to hearing your results.
Alexander, I have uploaded a zipped copy of the PerfView collection, whereby I had the solution in question opened but no files open. I then move to open the two "troublesome files" and the memory usage jumped as per my previous comments. I hope this aid's you in finding the root cause.
You will find it in the root of the FTP server named:
T562938.etl.zip
Obviously, I suspect this may contain references to our source code, so please be careful with this.
Another thing, that tends to kick code rush off on multiple analysis's, is when I'm modifying a form that contains around 15,000 lines in the designer file, and contains lots of complex controls. This is when I'm in the WinForms Designer this appears to be happening.
In case the question gets raised, I have disabled the "Check designer files" option under Static Code Analysis in relation to the above comment(s).
Mark,
Thank you for providing PerfView log files and additional information. Please give us some time to examine them. We guaranty that no one will access to your log files except the DevExpress team and they will be removed as soon as we finish examining them.
I appreciate it will take you and your team some time to examine the PerfView log files, and thanks for that additional statement, much appreciated.
Hi Mark,
Thank you for your patience. We have examined PerfView log files and it seems that this issue can be caused by discovering tests from source code. Please disable CodeRush Test Runner and check whether the issue persists. For this, perform the following steps:
Alexander, unfortunately in this case the TestRunner was already disabled, there are certain ticks within the "Service Options" area, but the Enabled flag is unticked.
Plus, we do not define Unit Tests for our solution at this stage.
Hi Mark,
Thank you for your clarification. We have found a possible cause of this behavior and prepared a build in which it is corrected: DevExpress.CodeRush.Roslyn-17.2.3.17339.vsix. Please install this build and let us know whether it has effect on your side.
Alexander, whatever you and your team have changed with the latest build you've supplied me, it appears to have cured the excessive resource usage when opening the two files aforementioned previously. Can I ask what it is you've discovered?
Hi Mark,
Thank you for informing us of your results. We are happy to hear that the issue is now fixed on your side.
As for the details of the fix, our Test Runner analyzes open files to show icons for test methods and test fixtures. As I wrote before, we found information in your PerfView log files that these operations take a long time on your side. After you clarified that you had already disabled Test Runner, we noticed that these Test Runner operations are not executed only when the "Show test run icons in the editor" option is disabled. In the provided hotfix, we have corrected this behavior and now if you disable Test Runner by using the main option, these operations are not executed, either.
Alexander, that make's abundant sense, and explains the reasons for the behaviour we were seeing and the questions you were asking me. Hopefully this should be it, performance wise for CodeRush for Roslyn, however if we have further issues I will be back in touch.
Would probably be worthwhile, making that particular issue as a separate ticket, just so it hit's the release notes, and that users are aware of this behaviour.
One thing I would like to point out, now I've started using the WinForms Designer again, and have been renaming elements, it appears as if CodeRush is getting in the way, prolonging the process, don't know if there is anything you can do in regards to this?
Hi Mark,
Would probably be worthwhile, making that particular issue as a separate ticket, just so it hit's the release notes, and that users are aware of this behaviour.
We are agree that it will be useful and have created the following ticket that will be specified in the Resolved Issues section of the next update's What's New: Increase CPU and memory usage on opening large code files
One thing I would like to point out, now I've started using the WinForms Designer again, and have been renaming elements, it appears as if CodeRush is getting in the way, prolonging the process, don't know if there is anything you can do in regards to this?
As concerns this issue, it would be great if you explain in more detail your actions or provide us with a screencast illustrating them. For instance, you can capture it using the free Jing tool from TechSmith.
Hi Mark,
We have just released our latest v17.2.6 build. We introduced an options page with the Code Issues Catalog. Now you can enable/disable a certain code issue rule in a certain language and specify the severity level for each code issue. The update is already available in the Visual Studio Marketplace.
Please note that now old separate options for the Unused Member analyzer are missing and you can enable/disable this analyzer in the catalog. By default this analyzer is registered in Visual Studio background analysis.
Since the Unused Member analyzer's work in background caused performance issues on your side, we suggest you unregister it.
For this, perform the following steps:
Alexander, many thanks for this update on the releases within CodeRush for Roslyn. Once I have updated I will do as you suggested. I'm also glad to hear that you can now enable/disable code issue rule within the Code Issues Catalog.
You are welcome, Mark.