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

Notification

Icon
Error

v2.4.0.2 - Build takes long time to process.
MrClyfar
#1 Posted : Wednesday, February 26, 2014 9:44:02 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/6/2011(UTC)
Posts: 17

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I'm using NCrunch v2.4.0.2 with the engine mode of "Run all tests automatically."

When making changes to the code, I see that NCrunch is processing a build, but for some reason it takes a long time to complete. Even changing a small piece of code, such as adding a space, results in a lengthy wait for the test to be run.

The duration of the wait can be in the ballpark of 1 - 2mins.

Likely I may have a setting which needs to be changed, but I'm not sure where to begin. Any advise would be much appreciated.

Thanks.
Jason.

MrClyfar
#2 Posted : Wednesday, February 26, 2014 9:49:03 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/6/2011(UTC)
Posts: 17

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Sorry, I just realised I posted this in the wrong forum, should have been in the "Build/Test Issues" section.
Remco
#3 Posted : Wednesday, February 26, 2014 11:36:02 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Hi, thanks for sharing this issue.

The first thing to confirm is which project is responsible for the long build time. I recommend watching the processing queue when you make a change. Is there a particular project that takes a long time to build compared with others?

If you have a project that consists of many included files (for example, if you've used the 'Additional files to include' configuration setting with a very broad wildcard), then NCrunch will have much more work to do when it first creates the workspaces for the project. This is because NCrunch needs to build several shadow projects inside a separate area of your disk, copying everything into this location from your foreground project. After the engine has been running for a while, it will have set up enough workspaces to support the level of concurrency you have configured it to use, and the build times should improve.

Something else to watch out for is custom build steps that take a long time. MSFakes and Code Contracts are known to greatly increase build times. Are you using either of these frameworks or any other tools that may have an impact here? How long does your solution normally take to build if you run a full Rebuild after a Clean?
MrClyfar
#4 Posted : Thursday, February 27, 2014 7:16:07 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/6/2011(UTC)
Posts: 17

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hiya.

I created a fresh unit test project, with one test, which had a reference to a class library project. All was fine, NCrunch did not take long at all to process the build.

When I added a fakes assembly, and did the tests again, there was a bit of a delay, but not close to the length of the other solution where I experienced the lengthy waiting. I will keep an eye on this, but it could be my other solution is a one-off, in that there is something about it that causes the delay. It's not a complicated solution at all, but it could be Fakes related that it takes so long to run.

Cheers.
Jason.
Remco
#5 Posted : Thursday, February 27, 2014 10:42:01 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Hi Jason -

Aaron Job has a useful article that you might want to have a look at - http://blog.gravypower.net/ncrunch-sharepoint-and-microsoft-fakes/.

Basically, there is a way you can improve the performance of NCrunch with MSFakes. Give it a try and see if it helps!


Cheers,

Remco
MrClyfar
#6 Posted : Thursday, February 27, 2014 10:49:00 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/6/2011(UTC)
Posts: 17

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Excellent.

Following the tip in that article looks to have done the trick, The build process is much quicker.

Many thanks. :)

Jason.
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.040 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download