Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NCrunch causes VS2008 to lock up for a while every single build
witchdrash
#1 Posted : Tuesday, August 28, 2012 11:27:33 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/28/2012(UTC)
Posts: 11
Location: Manchester

Thanks: 1 times
This is causing quite a few people here issues now, whenever NCrunch begins a build VS2008's GUI locks up (It's still accepting commands as if you keep typing it catches up after about 10 seconds), the problem is this happens all the time as NCrunch kicks off a build whenever it detects a change, it means that we are having to enable ncrunch, run all the tests, check code coverage, and then switch it off, make our code changes, and turn it back.

Once running tests everything is absolutely fine, it's just when building that we're getting issues.

The project is about 60k lines and is split over 9 projects.

Any ideas?

Owen
Remco
#2 Posted : Tuesday, August 28, 2012 9:05:05 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,979

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Owen,

Thanks for posting!

Can you share any details about the computer you're running on? How many processor cores does it have? Is it a low-spec machine?

If it's a multi-core machine, make sure you haven't accidentally assigned processor cores to BOTH NCrunch AND Visual Studio - as this can cause the behaviour you've described. Running through the configuration wizard again should reset the processor configuration if this is indeed the problem.

The next thing to do would be to look at whether you have any custom steps or events running as part of your build. NCrunch will restrict its processing to only specific processor cores, but if you are running heavy-weight external processes as part of your build, NCrunch may not have control over these.


Cheers,

Remco
Remco
#3 Posted : Tuesday, August 28, 2012 9:13:10 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,979

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Sorry I just thought I'd also quickly check whether you've also experienced this problem while using NCrunch with other good sized solutions on your computer. This is quite an important factor in determining the source of the issue.

Cheers,

Remco
witchdrash
#4 Posted : Thursday, August 30, 2012 8:59:49 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/28/2012(UTC)
Posts: 11
Location: Manchester

Thanks: 1 times
The machine is an I7-860 with 8 gig of ram, ncrunch has cores 1,2 and VS has the rest.

I have noticed this on all but the smallest of projects on this machine, and I know a couple of other people using ncrunch on this solution are suffering the same thing. (Machines are all the same spec as they were all purchased at the same time)
Remco
#5 Posted : Thursday, August 30, 2012 10:58:20 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,979

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Thanks. The specification of your machine is slightly better than the machine being used to develop NCrunch itself (which isn't a small solution), so I'm sure your hardware should normally be more than adequate for a good experience.

Performance issues like this can often be tough to track down. I hope you don't mind me asking a bunch of questions to try better deduct what may be causing the problem:

- Do you have a later version of Visual Studio installed on your machine? (i.e. 2010, 2012..) If so, do you experience the same problem while working with a large solution in this version?
- Can you list the names of any other plugins you have installed in VS2008?
- Do you experience this problem with an older version of NCrunch? (i.e. if you were to install 1.38b?)
- Are you running any software on your machine that could cause large amounts of I/O activity?
- When you experience the sluggishness/lockups, what kind of information do you see in windows task manager? Is the I/O queue full? Are any individual CPU cores excessively loaded? Where is the largest amount of CPU activity coming from?

Background builds are famous for generating a lot of I/O activity, so something that may make a difference in your case is to try making use of RAM disk software to create a virtual hard drive out of available memory. If you point NCrunch's Workspace Base Path at this RAM disk, it can greatly reduce the load on your hard drive and MAY completely solve the problem (if you have the memory resources to do it).

Thanks!

Remco
witchdrash
#6 Posted : Wednesday, September 5, 2012 10:12:29 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/28/2012(UTC)
Posts: 11
Location: Manchester

Thanks: 1 times
Turns out ncrunch and resharper don't play nice together, removing resharper made ncrunch work as advertised, problem is, we rely heavily on resharper so if it becomes a choice between the two tools ncrunch will get the boot :(
Remco
#7 Posted : Wednesday, September 5, 2012 10:44:54 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,979

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Are you, by chance, using the solution-wide analysis features of Resharper? I know that this can cause a bit of extra spinning. If turning it off makes a difference, you may be able to have your cake and eat it too ...

In theory, NCrunch should play fine with Resharper. A large percentage of the user base is using both products in combination and (as far as I know) without problems. I suggest trying to selectively disable some of the features of Resharper to see if there is specific feature that is causing the clash. If there is anything in your VS/Resharper that causes writing to the disk on each keystroke, I can see how this might degrade performance with NCrunch running (as NCrunch can thrash the disk quite hard).
witchdrash
#8 Posted : Wednesday, September 5, 2012 12:58:02 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/28/2012(UTC)
Posts: 11
Location: Manchester

Thanks: 1 times
We aren't but it seems to be an issue with 6.1 and 6.1.1 of resharper and ncrunch, one of our devs is on 5 and has no issues, I had a nightmare on 6.1.1 and a few of our other devs were suffering on 6.1, but I've just downloaded 7 and getting no issues at all
Remco
#9 Posted : Wednesday, September 5, 2012 9:23:29 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,979

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Interesting. I know that Resharper 7 had some big performance improvements rolled into it (I very much noticed the 6-7 upgrade on VS2010). You're the first person that's reported this issue, although not many people are using NCrunch on VS2008, so it COULD be more noticeable on VS2008. I guess the basic assumption could be that R#6 is doing something that locks the main thread, and the activity of NCrunch pushes this to the point where it is unbearable.

If you need to stick with R#6 (i.e. due to licensing), I have to recommend trying the RAMDisk approach. It sounds like your solution isn't too big, so 8GB of RAM should be enough to take your NCrunch workspaces off your HDD and throw them into memory ... this will massively reduce system load and may very well solve the problem.
witchdrash
#10 Posted : Thursday, September 6, 2012 8:17:21 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/28/2012(UTC)
Posts: 11
Location: Manchester

Thanks: 1 times
Remco;2766 wrote:
Interesting. I know that Resharper 7 had some big performance improvements rolled into it (I very much noticed the 6-7 upgrade on VS2010). You're the first person that's reported this issue, although not many people are using NCrunch on VS2008, so it COULD be more noticeable on VS2008. I guess the basic assumption could be that R#6 is doing something that locks the main thread, and the activity of NCrunch pushes this to the point where it is unbearable.

If you need to stick with R#6 (i.e. due to licensing), I have to recommend trying the RAMDisk approach. It sounds like your solution isn't too big, so 8GB of RAM should be enough to take your NCrunch workspaces off your HDD and throw them into memory ... this will massively reduce system load and may very well solve the problem.



This is what I was thinking, we have enough R#7 licenses to get most people using it before we buy the upgrades to the rest, so it's not an issue.

As for post-build custom steps we do run quite a bit through post-sharp but not when we build from the IDE, only through our pre-commit rake job.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.057 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download