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

Notification

Icon
Error

Large Solution 146 projects
pglaspey
#1 Posted : Monday, November 12, 2012 9:25:29 PM(UTC)
Rank: Member

Groups: Registered
Joined: 6/1/2012(UTC)
Posts: 28
Location: California

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
I am attempting to run Ncrunch on our main application which has 146 projects. We are successfully using it on a smaller project and with our eval period about to run out I need to get it working with this one to get approval to license it for our shop (should be about 8 licenses).

It loaded all the projects and was stuck on

NCrunch is initializing Loading Project 100 of 100. (Tests window said NCrunch is initializing)

then switched to

NCrunch is initializing Loading Project 1 of 1. (Tests windows says No tests are queued for execution. Monitoring no tests, with no tests ignored)

The blue circle is spinning. Nothing is in the NCrunch Tests window and nothing is in NCrunch Diagnostics Output window.

Any ideas...

I can build it through vs 2012 with no errors.
Remco
#2 Posted : Monday, November 12, 2012 11:17:09 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi, thanks for posting and for your interest in NCrunch!

NCrunch should support solutions with many projects, although the initial load time may be higher than for smaller projects.

If NCrunch gets stuck during initialisation with no visible activity for more than 3 minutes, then most likely there has been an internal problem. Would you be able to submit a bug report when the initialisation has stopped? Hopefully this will give me the information I need to find the issue and provide you with a workaround or fix.


Cheers,

Remco
pglaspey
#3 Posted : Tuesday, November 13, 2012 4:12:04 PM(UTC)
Rank: Member

Groups: Registered
Joined: 6/1/2012(UTC)
Posts: 28
Location: California

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
I have submitted a bug report. I am also loading a single project at a time to try and find problematic projects. I have one project right now that takes NCrunch 5 minutes to build. I need to find a way to reduce this time if there is a way.

Edit..


I Changed Instrument Output Assembly and it brought build time down to 1 minute.
Remco
#4 Posted : Tuesday, November 13, 2012 9:33:35 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Thanks for submitting the bug report. It looks as though NCrunch is throwing OutOfMemoryExceptions when traversing the project relationships within your solution.

I've noted this down for review as part of the next minor release, as it's possible there is a resource consumption or performance issue that is being surfaced by the size of your solution structure.

I'm wondering if you may be able to try the following to see if this makes any difference:
- Ensure you have no other programs running on your machine other than Visual Studio
- Disable any background analysis tools you have inside Visual Studio that may increase memory consumption

For the project that is taking a long time to build, can you give me any indication of the size of this project? i.e. in times of lines of code or compiled assembly size? Does the project contain any large resource files?



Thanks!

Remco
1 user thanked Remco for this useful post.
pglaspey on 11/13/2012(UTC)
pglaspey
#5 Posted : Tuesday, November 13, 2012 9:37:45 PM(UTC)
Rank: Member

Groups: Registered
Joined: 6/1/2012(UTC)
Posts: 28
Location: California

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Complied install size is about 140mb.

Last I checked the number of lines of code including white space was well over 2 million.

I dont have any other tools running than the default vs stuff.

Our large resources (images) is actually compiled in a separate solution.

I realize we need to trim down our solution but that happens gradually as we have time.

The main culprit we have is our model which has 500+ classes and much generated code (generated by Ideablade). Some of these classes have 7-10k lines of code. this project takes 5+ minutes to build in NCrunch 1+ if I turn off instrumenting.
Remco
#6 Posted : Tuesday, November 13, 2012 9:58:38 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
I have a feeling that it may be impossible to have an optimal experience with NCrunch on a solution of this size, without selectively disabling large parts of it or making changes to your solution structure. I hope that NCrunch will be able to better support solutions of this size/structure in future as the tool matures, but for the time being I may be able to suggest a few things to help take the edge off the resource hogging:

- Assuming that your generated code is housed within its own project(s), consider removing the projects containing generated code from the solution itself and referencing this code using Assembly References instead of Project References. This will massively reduce the load placed on your IDE and tooling by the generated code, and NCrunch will simply treat it as referenced material rather than part of the solution.
- Consider suppressing code coverage and instrumentation for very large classes within your solution by using NCrunch's coverage suppression syntax. This will reduce the instrumentation overhead.
- As you've already done - turning off 'Instrument Output Assembly' for large projects will make a big difference to build times and performance in general
- If you have large non-critical projects included in your solution, try switching them off with the 'Ignore this project completely' configuration option


Cheers,

Remco
Remco
#7 Posted : Monday, December 10, 2012 5:24:53 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
For anyone interested, 1.43 has just been released with a performance fix targeted to projects of a large size. Although the sheer size and complexity of the solution above may still contain different challenges for NCrunch, I hope that the new release would at least result in drastically reduced build times.
pglaspey
#8 Posted : Thursday, December 13, 2012 3:51:07 PM(UTC)
Rank: Member

Groups: Registered
Joined: 6/1/2012(UTC)
Posts: 28
Location: California

Thanks: 2 times
Was thanked: 1 time(s) in 1 post(s)
Remco;3388 wrote:
For anyone interested, 1.43 has just been released with a performance fix targeted to projects of a large size. Although the sheer size and complexity of the solution above may still contain different challenges for NCrunch, I hope that the new release would at least result in drastically reduced build times.


I tried this build but had to revert to previous version due to problems with build failures.

This was happening on my smaller solution that was working perfectly before the upgrade.

I sent in a bug report.

Basically what was happening was when I was changing code either in a unit test or application code NCrunch would try to rebuild and my test project would fail to build. I would have to reset ncrunch to get it building again, then next time I changed code, it would happen again.
Remco
#9 Posted : Thursday, December 13, 2012 8:03:14 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Thanks for letting me know about this.

When 1.43 was first released (build 1.43.0.21), there was a regression in it that would cause builds to fail while processing projects containing read-only resource files that were referenced from other projects making use of the 'Copy referenced assemblies to workspace' setting. This would result in the behaviour you've described above (i.e. first or second build is OK, then the next gives a failure). 1.43.0.22 was pushed out less than 24 hours afterwards containing a fix for this specific problem. If you were fast on the upgrade to 1.43, you might want to redownload this version and give it another try to see if the problem has been solved.
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.059 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download