I just got a new computer (intel i7 gen 8, 16 GB memory, 1TB SSD). I downloaded Visual Studio 2017 community, and installed my DevEx items. Now Visual Studio is so slow I cannot use it. It takes over 5 minutes for my solution file to load. When my files do load, if just hit the [Enter] key a few times I get the message: "Please wait for an editor command to finish", and then Visual Studio hangs for about a minute.
Since this a new computer, I can uninstall/reinstall anything so we can get this problem solved.
Thanks
Hello,
It is difficult to say why this occurs in your project based only on the provided information.
As far as I understand, the problem appeared after installing our products. First, I recommend you upgrade your VS to the latest available version because several similar issues were fixed recently - VS2017 is slow and mostly unusable,Visual Studio taking very long time to open projects, hangs doing many different tasks.
If this doesn't help, would you please record a video demonstrating this slowness? You can record a video using the ShareX tool.
Please also try disabling all add-ons in the "Extensions and Updates" dialog (Tools -> Extension and Updates) to see if this slowness is caused by an extension:
I look forward to your results.
That did the trick. I disabled all extensions except for Roslyn, and VS loaded quickly. Now I will enable all the DevEx extensions and see what happens.
Second step is to mirror the extensions on my old computer, so I know everything is the same.
Thanks again
So after testing, CodeRush is the culprit. I really like using CodeRush, but it makes VS unusable.
Is there a CodeRush log I can send you?
Are there some CodeRush settings I can use to try and speed it up?
Thanks
Eric,
Would you please clarify what CodeRush version you have installed.
We have had received similar reports about a performance issue with CodeRush 18.2.4 version.
The slow down might be caused by the Rich Comments feature.
We have already made several fixes in this regard.
Please try the following daily build, which addresses this issue:
DevExpress.CodeRush.Roslyn-18.2.4.18346.vsix
It contains performance improvements in the Rich Comment feature.
Please let me know how it works.
Alternatively, I would also suggest you try to disable the Rich Comments feature.
Follow these steps to get to the Rich Comments options page:
Editor\All Languages
Disabling CodeRush Rich Comments worked for me. Now VS and CodeRush are working great!
I have CodeRush 18.2.4
I downloaded and installed CodeRush 18.2.4.18346. The problem I am having is after correcting a misspelled word in a comments section. I either get a "Please wait for an editor command to finish…" message or a "Committing Line" message. Each message takes about 8 seconds to complete.
I did get a " 'SpellCheckerCodeFixProvider' encountered an error and has been disabled. " error. I copied the Stack Trace:
----------
System.AggregateException : One or more errors occurred. ---> Object reference not set to an instance of an object.
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.InvokeWorker(Func`1 getFromDocument,IProgressTracker progressTracker,CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Editor.Implementation.Suggestions.SuggestedAction.<>c__DisplayClass18_0.<InvokeCore>b__0()
at Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformAction(IExtensionManager extensionManager,Object extension,Action action)
---> (Inner Exception #0) System.NullReferenceException : Object reference not set to an instance of an object.
at DevExpress.Internal.WeakEventHandlerBase`1.Invoke(Invoker invoker)
at DevExpress.Internal.WeakEventHandlerStrategy`2.Raise(Object sender,TArgs args)
at DevExpress.XtraSpellChecker.SpellCheckerCustomDictionary.RaiseWordAddedEvent(String word)
at DevExpress.XtraSpellChecker.SpellCheckerCustomDictionary.OnWordAdded(String word)
at DevExpress.XtraSpellChecker.SpellCheckerCustomDictionary.AddWord(String word)
at DevExpress.CodeRush.VSFeatures.SpellChecker.SpellCheckerFactory.AddToDictionary(String word)
at DevExpress.CodeRush.VSFeatures.SpellChecker.SpellItemChecker.AddToDictionary(String word)
at DevExpress.CodeAnalysis.VisualBasic.Diagnostics.SpellChecker.SpellCheckerCodeFixProvider.AddToDictionaryOperation.Apply(Workspace workspace,CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.CodeActions.CodeActionOperation.TryApply(Workspace workspace,IProgressTracker progressTracker,CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Editor.Implementation.CodeActions.CodeActionEditHandlerService.ProcessOperations(Workspace workspace,ImmutableArray`1 operations,IProgressTracker progressTracker,CancellationToken cancellationToken)
at async Microsoft.CodeAnalysis.Editor.Implementation.CodeActions.CodeActionEditHandlerService.ApplyAsync(<Unknown Parameters>)<---
---------
After further testing, file size has a lot to do with the "Please wait for an editor command to finish…" message or a "Committing Line" message. Smaller files do not get the message.
On a medium size file I got this error when trying to rename a function. " 'PullMemberUpProvider' encountered an error and has been disabled." Here is the Stack Trace:
----------
System.InvalidOperationException : Failed to compare two elements in the array. ---> System.Collections.Generic.KeyNotFoundException : The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at DevExpress.CodeAnalysis.VisualBasic.Refactorings.PullMemberUp.MemberSortingComparer.MemberKindComparer.Compare(DeclarationStatementSyntax x,DeclarationStatementSyntax y)
at DevExpress.CodeAnalysis.VisualBasic.Refactorings.PullMemberUp.MemberSortingComparer.Compare(DeclarationStatementSyntax x,DeclarationStatementSyntax y)
at System.Collections.Generic.ArraySortHelper`1.InsertionSort(T[] keys,Int32 lo,Int32 hi,IComparer`1 comparer)
at System.Collections.Generic.ArraySortHelper`1.IntroSort(T[] keys,Int32 lo,Int32 hi,Int32 depthLimit,IComparer`1 comparer)
at System.Collections.Generic.ArraySortHelper`1.IntrospectiveSort(T[] keys,Int32 left,Int32 length,IComparer`1 comparer)
at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys,Int32 index,Int32 length,IComparer`1 comparer)
--- End of inner exception stack trace ---
at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys,Int32 index,Int32 length,IComparer`1 comparer)
at System.Array.Sort[T](T[] array,Int32 index,Int32 length,IComparer`1 comparer)
at System.Collections.Generic.List`1.Sort(Int32 index,Int32 count,IComparer`1 comparer)
at async DevExpress.CodeAnalysis.VisualBasic.Refactorings.PullMemberUp.PullMemberUpRefactoring.PullMemberUp(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.VisualBasic.Refactorings.PullMemberUp.PullMemberUpRefactoring.ApplyChangeManager(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.TargetPicker.TargetPickerRegistrator.DoRegistration(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.RegisterRefactoring(<Unknown Parameters>)
at async DevExpress.CodeAnalysis.Refactorings.RefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
--------------
Eric,
Would you please clarify if these issues also occurred with the 18.2.4 version or it all started after installing the new daily build?
Please also give us additional information on the size of the file where you see this issue.
Would you please try to create a new VisualBasic project with only this file added?
Is it possible for you to send us this sample project where you can reproduce this issue?
Both crashed happened after I installed CodeRush version 18.2.4.18346
Eric,
Please give us some time to research this and try to reproduce. We will update this ticket as soon as we have any results.
We have reproduced and fixed the issue with the Pull Member Up refactoring exception in the context of the following ticket: Pull Member Up throws an exception when specific code is used
Eric,
I've created a separate ticket on your behalf for the SpellCheckerCodeFixProvider error.
Here is the link to the ticket: SpellCheckerCodeFixProvider encountered an error and has been disabled error.
It has been placed in our processing queue and will be answered shortly.