Performance Issues : how to make it faster?
Hi forum
We have a lot of classes in c# with usually up to 1500 lines and more!
Now, there is a big performance lack on code analysis feature. The main reason, why my colleagues don't (buy) use ReSharper is this performance lack an the fact, that the code analysis can't become easy temporary enabled/disabled. (And they are laughing about me, when they see how long it takes for keyboard feedback on coding)
Is there any hint to avoid this lack? The thing is, there mustn't be a complete analysis for this big classes, but the having of the coloring will be very useful. But this two things are depending on them selves it seems. Another idea is to "quick enable/disable" this feature as it is possible to do for "Solutionwied analysis".
Thanks for responses and tips
kaepten
Please sign in to leave a comment.
Thank you for the feedback.
There is "hidden" shortcut - Ctrl-8 - to quickly enable/disable code
analysis for specific file
And, also, please try 4.0.1 nightly build - code analysis performance is
significantly improved there
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"kaepten" <no_reply@jetbrains.com> wrote in message
news:18883750.70391214993832128.JavaMail.jive@app4.labs.intellij.net...
>
>
>
>
How about an attribute that disables ReSharper analysis on a class? Or a pragma to disable it on a file? Excluding a file from "solution wide analysis" does not seem to be shared across environments, and Designer and other generated files keep showing up (and wasting time) in analysis.
Frankly, with the advent of "partial" classes, I don't see too many large files anymore, except for generated code which usually should be excluded from ReSharper analysis.
"kaepten" <no_reply@jetbrains.com> schrieb im Newsbeitrag
news:18883750.70391214993832128.JavaMail.jive@app4.labs.intellij.net...
Well, IMHO, your classes may needs some refactoring.
Regards
Albert
That is always the "easy" answer thrown out by people before, and heck, I've said it too, though usually in response to people with 8000 line source files. I've run into R# perf issues in files in and around that size range, but never on anything much smaller... Until Monday.
On Monday, R# 4 RTM started introducing a one or two second freeze after each keypress, during which devenv spiked the CPU, on a file only 800 lines long. Luckily, I was already positioned well to factor the file out into several much smaller files but I've never seen R# choke up on such small files.
Something is definitely up with R# 4, and I say this because people used to pop into the forum to make similar complaints about R# 3, except that now they are complaining about files one fifth as large.
I'll see if I can put these files back together some time this week, see if the perf issue returns, and then update to a nightly build and see if things improve.
Can you also try to provide guidance on what it was about the 800 line file that was causing problems? Unless there was a background solution wide analysis in progress, I have never encountered a significant slowdown on non-generated files unless they made heavy use of LINQ.
I noticed that there are considerable slowdowns in build 4.0.819 if you use extension methods a lot. I think jetbrains should put some effort in improving this part of their engine.
And this definitely was using a tonne of extension method calls, as it was a unit test file with loads of mocks being stubbed, having expectations set on them, and having them verified, all through the new Rhino.Mocks syntax that is heavily based on extension methods.
As mentioned earlier, I will be trying to isolate the problem some time this week but may or may not be able to get to it given my current workload.
Thanks for reply
Where can I download this nightly build? Is it the default download of Resharper on the homepage?
kaepten
I expected this reply
I cannot change anything on these classes, it' a part of a framework (company standard - with auto codegeneration). I know the rules that a class has to have just n-lines (how many?), and since I use ReSharper, I'll strictly follow this rule for other classes outside this framework. ;)
kaepten
"kaepten" <no_reply@jetbrains.com> schrieb im Newsbeitrag
news:28816414.77391215077190393.JavaMail.jive@app4.labs.intellij.net...
>>
>> And, also, please try 4.0.1 nightly build - code analysis performance is
>> significantly improved there
>
>
http://www.jetbrains.net/confluence/display/ReSharper/ReSharper4.0Nightly+Builds
905 or newer should be used.
Regards
Albert
I got a huge improvement in typing speed after I disabled the navigation bar (Options->Text Editor->C#->General->Display->Navigation bar).
Not sure why that was a problem on this particular box, it works fine on other machines.
I had similar problems (with very small classes though (around 200 lines)).
The problem appeared after installing a nightly build from version 4.0.1
(which was broken). I then reinstalled version 4.0 and suddenly the
performance dropped.
I often got CPU spikes from devenv at around 100% and the entire IDE was
very sluggish.
After a reboot, uninstall of R#, another couple of reboots, working with
Visual Studio (2008) without R# for a few minutes, a reboot, a repair of
Visual Studio, a reboot and then a reinstall of R# it all went back to
normal :)
I don't believe all this work should be necessary for most, but try if
you're having trouble...
/Kenneth
"kaepten" <no_reply@jetbrains.com> wrote in message
news:18883750.70391214993832128.JavaMail.jive@app4.labs.intellij.net...
>
>
>
>
I had similar problems (with very small classes though (around 200 lines)).
The problem appeared after installing a nightly build from version 4.0.1
(which was broken). I then reinstalled version 4.0 and suddenly the
performance dropped.
I often got CPU spikes from devenv at around 100% and the entire IDE was
very sluggish.
After a reboot, uninstall of R#, another couple of reboots, working with
Visual Studio (2008) without R# for a few minutes, a reboot, a repair of
Visual Studio, a reboot and then a reinstall of R# it all went back to
normal :)
I don't believe all this work should be necessary for most, but try if
you're having trouble...
/Kenneth
"kaepten" <no_reply@jetbrains.com> wrote in message
news:18883750.70391214993832128.JavaMail.jive@app4.labs.intellij.net...
>
>
>
>
"Maybe your classes need refactoring..."
That may be true, but what tool exactly is one supposed to use to refactor it with, huh? It's classes that are out of control that need R# the most.