Resharper Command Line Tools - Inspect code performance issues
Hi Team
I am running InspectCode.exe to run inspection on a solution with about 60 projects. I am having multiple issues (different issue in different run for exactly same inspection) trying to run inspection for even 2 files as well.
Command Line Tools Version: 2020.1.2
Inspection command
C:\Tools\JetBrains.ReSharper.CommandLineTools.2020.1.2\inspectcode.exe C:\Projects\Test.sln
--o=\codeinspection\resharper-inspectcode-report.xml --severity=SUGGESTION
--no-swea --include='Source/Data/Repositories/ARepository.cs;Source/UnitTests/Data.UnitTests/ARepositoryTests.cs;'
Ran the above with the --debug flag also to see for more details. Following are the observations:
- InspectCode takes inconsistent time to inspect 2 files. I was expecting inspection of 2 files to be quick (may be a minute or 2). But, it took minimum of 6 minutes to upto 14 mins in the 5-6 runs that I did.
Following are the exceptions/warnings that I can see reported many times (eventually this goes away but after roughly 10 mins).
--- EXCEPTION #1/2 [AssertionException]
Message = "The settings change dispatch client shoul
d complete processing the changes in reasonable time. The task has failed to complete in the time alotted of 00:00:32."
ExceptionPath = Root.InnerException
ClassName = JetBrains.Diagnostics.Assertion+AssertionException
HResult = COR_E_EXCEPTION=80131500
--- Outer ---
--- EXCEPTION #2/2 [LoggerException]
Message = "The settings change dispatch client should complete processing the changes in reasonable time. The task has failed to complete in the time alotted of 00:00:32."
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = "Exception #1 at Root.InnerException"
HResult = COR_E_APPLICATION=80131600
StackTraceString = "
at JetBrains.Util.Threading.JetTaskEx.<>c__DisplayClass14_0.<AwaitNoLongerThanCore>b__1(Task t)
at System.Threading.Tasks.Task.Execute()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
at System.Threading.Tasks.ThreadPoolTaskScheduler.TryExecuteTaskInline(Task task, Boolean taskWasPreviouslyQueued)
at System.Threading.Tasks.TaskScheduler.TryRunInline(Task task, Boolean taskWasPreviouslyQueued)
at System.Threading.Tasks.TaskContinuation.InlineIfPossibleOrElseQueue(Task task, Boolean needsProtection)
at System.Threading.Tasks.Task.FinishContinuations()
at System.Threading.Tasks.Task.InternalCancel(Boolean bCancelNonExecutingOnly)
at System.Threading.CancellationCallbackInfo.ExecuteCallback()
at System.Threading.CancellationTokenSource.ExecuteCallbackHandlers(Boolean throwOnFirstException)
at System.Threading.CancellationTokenSource.NotifyCancellation(Boolean throwOnFirstException)
at System.Threading.CancellationTokenSource.TimerCallbackLogic(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.TimerQueueTimer.CallCallback()
at System.Threading.TimerQueueTimer.Fire()
at System.Threading.TimerQueue.FireNextTimers()
- I can see many warnings similar to following as well:
Warning: PersistentIndexManager was requested about missing file: vendor.js
Warning: There are not reached sync points after 00:01:00 timeout: <len=3>
PsiCaches: Caches are running
StandalonePsiModuleAttributesCache: PsiModuleAttributeCache::Initial Update
InvalidateDependentFilesOnTsFileConfigScopesCacheChanged: TsFileCo
nfigScopesCache
The above warning sometimes occurs 10 times (taking up to 00:10:00).
Query: What does the above 2 warnings mean and why do they go away after few times?
In addition I can see following errors as well:
error ASPCONFIG: The path is too long after being fully qualified. Make sure the full path is less than 260 characters and the directory name is less than 248 characters.
Additional infromation:
- Even if I specify single project at time of running inspection, the execution time remains nearly the same (single project using --project)
- I am getting the output every time but it take sometimes 5 mins and sometimes 15 mins.
Query: What is the use of "--caches-home", what type of cache does it manage? Is this cache relevant in hosted build agents in "Azure devops" etc?
I am intending to include inspections using the resharper command line tools in the ci pipeline in azure devops but, the above issues, time to execute resharper clt and inconsistent timings is making it hard. 10-15 mins increase in PR build time will make it hard for us to use resharper command line tools in the pipeline.
One more information: I have got the output every time even with the above errors (appears these are retryable in the clt implementation) and warnings. Its the overall execution time and its inconsistency that is limiting me to integrate clt in the pipeline.
Please let me know if I am missing something or doing incorrectly. Is there any way to reduce the execution time of the inspection run? or please let me if you need any more details.
Raghav
Please sign in to leave a comment.
Hi Team
Is there any feedback about the above query?
Raghav