Resharper, like it or not? + productivity tools

Posts   
 
    
stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 12-Mar-2008 14:39:42   

Hello, I have purchased Jetbrain's resharper a few months ago. I like it very much; it checks parameters/documentation consistency, provides on-the-fly code analysis, comes with a lot of useful shortcuts and features... In overall, I think using it can give a good productivity boost.

But, Now that my project has grown quite large, with a lot of big GUI classes and a nice quantity of dependencies, I feel like my developer experience has significantly degraded. Everytime I open a file in my solution or try to copy-paste a few lines of code, vs2008 freezes for many seconds, I wouldn't say it's totally unusable but I feel frustrated when I see my Core2 6600 with 2gig of Ram running like an old crappy 486!

Here's the story of a simple copy-paste :

Right-clic (2 seconds to pop the menu) Copy (3 seconds to get back to the code) Open new code file (4 seconds idle time ) Paste (5 seconds) Oh I did a mistake, undo changes (3-4 seconds), let restart !

And that's not all, after a while, performance tends to become worse and worse, and I usually end up restarting vs2008 or sending OutOfMemory bug reports. I really don't know what to do about it, there's a new major release of resharper coming, but I'm not sure if it's worth upgrading or not.

I know that many llblgen users here are working on large projects and give importance to productivity, I would like to ask if they (have) encounter(ed) performance issues like mines with resharper, and eventually what other productivity tool they are using...

Anonymous
User
Posts: 0
Joined: 11-Nov-2006
# Posted on: 12-Mar-2008 16:24:22   

Yip. That was my problem too. I gave up after version 2.6. Works great for small projects but ....

Pete

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 12-Mar-2008 16:44:10   

I'm using R# 3.1 on VS05. I get out of memory errors on occasion, but not frequently enough to abondon the product.

There is a nightly build program of R# for VS08. all the posts I see about it say the product is working great and nobody has hit any major bugs.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39590
Joined: 17-Aug-2003
# Posted on: 12-Mar-2008 17:33:28   

I also gave up at v2, and tried v3 but it was still too slow. All those add-ins seem nice but they eat away too much cpu power it seems. The worst things that happen with resharper is that you type a few lines and it starts analyzing the code...

I always wonder what these praising people are doing inside the IDE, it can't be writing code on large projects as all these add-ins die when it comes to large projects.

Frans Bouma | Lead developer LLBLGen Pro
Jez
User
Posts: 198
Joined: 01-May-2006
# Posted on: 12-Mar-2008 18:15:59   

The Resharper 4 nightly builds seem noticeably faster on my system than version 3.x.

Max avatar
Max
User
Posts: 221
Joined: 14-Jul-2006
# Posted on: 13-Mar-2008 10:08:53   

I've had a similar experience using VS 2005 SP1 and DevExpress Refactor!™ 2.1.2 for Visual Basic® .NET.

Works good on small project, but get really slow on my current SW (1 solution, 5 project, 70'000 (growing) lines of code (not counting the LLBLGen generated code, I compile this in a separate solution so that I can use the compiled DLL. I've tried put everything in a single solution, but VS 2005 was too slow, even without DevExpress Refactor))

Anyway, Refactor was too slow and VS 2005 was eating tons of RAM. So I uninstalled Refactor.

I didn't tried more recent version of this product.

Just my 2 cent.

silky avatar
silky
User
Posts: 38
Joined: 03-Feb-2008
# Posted on: 13-Mar-2008 10:20:39   

Yes I too found resharper slow and frustrating to use. Much more productive without it.

takb
User
Posts: 150
Joined: 12-Mar-2004
# Posted on: 14-Mar-2008 01:32:32   

I subscribe to the group of people who can't bear living without ReSharper. It's a must-have tool for my team and I. We find the productivity benefits to be substantial.

Re: Performance - I'm on a Dell D820 Laptop, 2GHz dual core processor, 7200rpm HDD and until recently 2Gb RAM. Our solution has 34 projects and around 200K LOC. We run SQL Server 2005 Dev Edition locally.

With VS 2005, we found the performance of ReSharper 3.0 and 3.1 just fine. It certainly didn't hinder us during development. (There were performance problems with an older 2.x version. I can't remember which one).

Going to VS 2008 was a different story though - but not strictly ReSharpers fault. When we went to VS 2008, performance of everything began degrading badly (when running VS 2008 ). Our machine was constantly swapping Virtual Memory - even though there appeared to still be memory free (probably sitting at about 1.6 - 1.8GB used). We upgraded our RAM to 4GB (only 3.0 GB - 3.4GB of that is usable though of course on a 32-bit machine depending on BIOS and devices) and things are great again. So I can only conclude that VS 2008 has higher memory requirements. Of course ReSharper consumes memory to perform its magic (ReSharper reports 214MB in our current solution), but the cost benefit of having the additional memory to support ReSharper is well worth the investment as far as we're concerned.

We compile generated LLBLGen code in a separate project since including the generated code really does slow things down - with or without ReSharper.

We've currently got 172 entities. Just including the generated code as dll's in solution items works a treat. In fact we have the .lgp file as content inside one of our solution projects so that we can just double click to open up the LLBLGen designer from right inside Visual Studio. Almost integration! Plus we have our custom templates as content inside that same project so that they are source controlled along with the rest of our solution. Likewise we have the generated code solution and projects as content inside that same project again for source control. Generated code is not source controlled though (because you can just generate it!). We generate and build the generated code from within the folder structure of our main solution (to pick up the custom templates in-place) and the build output goes up a few directories into our main solution folder to be included as solution items).

takb
User
Posts: 150
Joined: 12-Mar-2004
# Posted on: 15-Mar-2008 03:48:18   

jmeckley wrote:

I'm using R# 3.1 on VS05. I get out of memory errors on occasion, but not frequently enough to abondon the product.

I noticed this on the ReSharper website (http://www.jetbrains.net/confluence/display/ReSharper/OutOfMemoryException+Fix):

OutOfMemory exceptions are often caused by address space fragmentation in Visual Studio process. The root cause is not aligned memory allocation policies in .NET Framework and devenv.exe. For users experiencing excessive OutOfMemory exceptions we provide a tool which overrides Visual Studio's memory allocation policy to ensure more continuous address space for Common Language Runtime.

To use the tool download wrappers.zip file, unpack it and run devenv2005_wrap and devenv2008_wrap instead of devenv.exe for Visual Studio 2005 and 2008 correspondingly.

takb
User
Posts: 150
Joined: 12-Mar-2004
# Posted on: 01-Apr-2008 05:05:53   

Otis wrote:

they eat away too much cpu power it seems. The worst things that happen with resharper is that you type a few lines and it starts analyzing the code...

I think I found the main cause of a slow ReSharper experience. If you have a class with a lot of lines of code (Eg EntityBase2 which in LLBLGenPro 2.5 has nearly 5000 lines) then the Code Inspection function consumes significant CPU for a significant period of time. You'll really notice the impact. (We had a similarly sized class in our solution which is how I made the distinction. I just kept having slowness problems with this one class whereas all other classes were fine). If your classes are of a more reasonable size (hundreds of lines) then you don't tend to notice the impact.

You can turn off the Code Inspection feature however unfortunately you can't control that per source file - it's either on or off for your entire solution.

If you turn it off you can still use the rest of ReSharpers features (which are still very worthwhile).

They obviously either need to improve the performance of their code inspection feature or else throttle its CPU usage. I might log a suggestion.

[Edit] Ok, I turned off Code Inspection for our large class and it does still seem slow just typing (though improved by not having Code Inspection). I don't experience slowness on other smaller classes. So I can only conclude that ReSharper performance is directly related to LOC in a single class. The number of files in a solution doesn't seem to have a significant impact.

stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 01-Apr-2008 07:42:40   

I browsed resharper forums and read an interesting post which suggests disabling the intellisense feature (and use the standard one of vs2008 ). In my case, it seems to make a big difference, at least I no longer have the IDE becoming unresponsive when I copy-paste a method.

simmotech
User
Posts: 1024
Joined: 01-Feb-2006
# Posted on: 01-Apr-2008 08:47:57   

I absolutely can't live without Resharper now. I also had problems with Out of Memory but they weren't all necessarily to do with Resharper.

Here are some things I found that make VS2008 fairly stable now: 1) Increase your user and gdi handle count This article, http://www.mikedopp.com/archive/2007/07/13/increasing-user-handle-and-gdi-handle-limits.aspx, tells you how (I used 10384 rather than his suggested 8192). Also watch for other apps that increase their handle usage over time. Our standard desktop build, over which we have no control (well in theory stuck_out_tongue_winking_eye ) loads some monitoring apps that seem to have handle leaks - I routinely kill these processes when I start my machine. Also Outlook benefits from restarting when its handle count reaches 2000+

2) If you have a 4GB machine, add the /3GB switch in your boot.ini. After continually editing a largish project (especially when using the forms designers), VS2008 virtual memory was hitting 1.8GB and got unstable after that - out of memory/insufficient resources etc. - and needing closing down and reopening. With the switch, I can get 2.3GB+, no stability problems, and it doesn't seem to go higher than that.

3) For those with a high number of lines in a single file, Ctrl-8 toggles the Resharper interpreter on and off. (I've not had a big problem with VS becoming unresponsive when pasting code but if this only happens when editing a large file rather than just having it in the solution, this might help)

4) We use Perforce and updating to the latest release made a big difference when it does its refreshing in the background.

5) Defragging the disk on a regular basis also helps compilation speeds - just let it rip when you go to lunch or whatever.

Cheers Simon

takb
User
Posts: 150
Joined: 12-Mar-2004
# Posted on: 01-Apr-2008 14:40:34   

stefcl wrote:

I browsed resharper forums and read an interesting post which suggests disabling the intellisense feature (and use the standard one of vs2008 ). In my case, it seems to make a big difference, at least I no longer have the IDE becoming unresponsive when I copy-paste a method.

Thanks for finding this suggestion stefcl because for me, turning off intellisense ended up being the only change required to "fix" all the performance issues I was experiencing on large LOC source files! smile

After turning off ReSharper Intellisense, even the code analysis seems to have no noticable impact to normal operational performance. Code Analysis can take some time particularly on the large file, and it consumes one of my cores while it is analysing the code, however it must be running as a lower priority task as it doesn't seem to have a noticable impact.

For those who have experienced performance problems with ReSharper and are either persevering or else have given up, I strongly suggest you try turning off just the Intellisense feature and see how you go.

I can now see that this has been reported a number of times in the JetBrains forums so lets hope that JetBrains can do something about this one (because the ReSharper Intellisense is significantly superior to vanilla VS from a functional perspective).

Thanks Simmotech for the other suggestions. Although it looks like turning intellisense off negates the need to turn off the code analysis feature using ctrl-8.

Since upgrading to 4Gb we've also been running with a 1Gb RAM Disk. We checkout out solution onto the RAM disk and run VS from there. Performance is great especially build times. Our source trunk including associated utilities, libraries and build output is just over 1Gb. So we're running the RAM disk as a Compressed NTFS volume and the size on disk drops to around 500Mb. I could just check out our solution which would reduce that to probably 1/2 that size (including build output) so I could make the RAM disk smaller but the 1Gb works fine for us leaving enough memory for everything else. Even with NTFS Compression, the performance using the RAM disk far exceeds the performance using the HDD. We purchased some cheap commercial RAM disk software which also allowed the RAM disk to be persisted to the HDD at system shutdown (and regular intervals if you want). It automatically reloads the RAM disk at system startup so it all just looks like a normal persistent volume. You'd never know it was a RAM drive.

It works a treat and I highly recommended the approach.

kakaiya
User
Posts: 159
Joined: 20-Mar-2004
# Posted on: 02-Apr-2008 01:17:40   

Hi takb,

We purchased some cheap commercial RAM disk software which also allowed the RAM disk to be persisted to the HDD at system shutdown (and regular intervals if you want). It automatically reloads the RAM disk at system startup so it all just looks like a normal persistent volume. You'd never know it was a RAM drive.

Could you able to advice which commercial RAM disk software is good one to use or you are using.

Thanks in advance.

Regards.

takb
User
Posts: 150
Joined: 12-Mar-2004
# Posted on: 02-Apr-2008 01:25:11   

kaksss wrote:

Could you able to advice which commercial RAM disk software is good one to use or you are using.

We're using QSoft RAMDisk Enterprise (full): http://users.compaqnet.be/cn021945/RAMDisk/ramdriv.htm

Seems to work fine.

We're using the full version specifically because it saves the RAM disk content to your hard drive.

And it's only $USD19. Pretty cheap.

stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 02-Apr-2008 11:02:25   
And it's only $USD19. Pretty cheap.

Wow, it's really inexpensive! sunglasses , I'm going to give it a try. (Usually, when softwares contain enterprise in their name... they don't cost 20 bucks.)

kakaiya
User
Posts: 159
Joined: 20-Mar-2004
# Posted on: 03-Apr-2008 01:11:19   

thanks takb.

Appreciate it.

Regards.

tangent
User
Posts: 41
Joined: 30-Apr-2006
# Posted on: 07-Apr-2008 09:02:25   

Agreed on the RAMDISK, I will never code without it again, the speed boost is tremendous. Same goes for Resharper.. I'm not sure how I ever got anything done before I discovered the wonder that is push/pull members refactoring wink

I used to use Qsoft ramdisk but recently upgraded to SuperSpeed because their hybrid synchronous write mode is faster (I use synch mode because my entire OS and visual studio are on a 20gb ramdisk). If just using the interval backup mode then stick with Qsoft since it is quite a bit cheaper.

mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 07-Apr-2008 09:12:24   
tangent
User
Posts: 41
Joined: 30-Apr-2006
# Posted on: 07-Apr-2008 13:29:06   

mihies wrote:

One more for QSoft's RAMDisk. I even blogged about, see http://cs.rthand.com/blogs/blog_with_righthand/archive/2007/11/02/Speeding-up-build-times-dramatically.aspx

Miha, I must say thanks as I first tried RAMDisk after reading your blog entry. I bought a bunch of RAM and a motherboard with 8 slots the next day.

Build time of large solution reduced from around 1:20sec to less than 7 seconds now (was around 16 sec before I recently upgraded the processor also), that is a pretty massive improvement.

I would highly recommend ramdisk to anyone, especially with the RAM prices so low right now. I got 32gb ram and motherboard for the same price I paid for 4gb ram 2 years ago smile