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

Notification

Icon
Error

Build is happening too often
Mangust
#1 Posted : Thursday, January 10, 2013 3:26:01 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/16/2012(UTC)
Posts: 25
Location: Norway

Was thanked: 4 time(s) in 4 post(s)
I guess this should be more like a bug report for the build engine than a feature suggestions.
The problem for me now is that NCrunch tries to build too often. When I type the name of the method or comment or something like that it seems that NCrunch will do the build (or will try to do) few times during typing. I think that it should be at least configurable with a timeout after the latest key press. So I will set that I want to start the build only half a second after I finish typing. I think this will increase the performance a lot as I see that my typing is slower because of the build attempts after each key press.
Is it possible to do in the nearest future? Seems like it's not a very hard feature to do :)
Remco
#2 Posted : Thursday, January 10, 2013 9:33:05 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi, thanks for posting!

Right now NCrunch doesn't really 'know' anything about the source code its compiling, so it isn't able to make intelligent decisions about whether a build should or should not be run based on a particular change being made. There are plans in V2 for features that I hope should alleviate this problem in a number of different ways. I understand that the build triggering could be made more efficient and I've been looking at ways to implement this (with the delayed trigger being one of several options).

Normally though, the background builds shouldn't be causing a noticeable lag in the IDE. Are you able to share any more details about the system you're working on? Is it a low-spec machine?


Cheers,

Remco
Mangust
#3 Posted : Friday, January 11, 2013 8:39:29 AM(UTC)
Rank: Member

Groups: Registered
Joined: 11/16/2012(UTC)
Posts: 25
Location: Norway

Was thanked: 4 time(s) in 4 post(s)
Now, that is not really a low spec machine. It's an I7 with 4 cores and hyperthreading. I have allocated 2 cores to NCrunch and 6 are left for visual studio. I have a lot of memory as well. It does not seem it's happening all the time though. Sometimes it's ok. I have just checked and it was slow, and then I have disabled and enabled the NCrunch and it looks like it's fine again. I can't say for sure that it was because of reenabling but I did not change anything else.
P.S. It seems that even if NCrunch does not know about the code, the delayed trigger can be quite helpful at least now. It would be ideal of course if NCrunch will have an engine in the future that will be able to tell that the changes made don't require the build.
1 user thanked Mangust for this useful post.
Remco on 1/11/2013(UTC)
Remco
#4 Posted : Friday, January 11, 2013 8:49:21 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
I suspect something that may be having an impact is the amount of I/O activity being caused by the NCrunch builds. From what you've described, you should have ample CPU resources to be able to run the builds in parallel. It may be that if you are running tests that are quite I/O heavy (or make use of a DBMS), then the builds are enough to overload the disk queue and cause interruption to VS activities that make use of I/O calls. If you have enough memory available on your machine, it may be worth looking into setting up a RAM disk to store your NCrunch workspaces on - this will prevent the builds from clogging up the system and should give you a big performance boost too.

Another option is to try reducing the 'Max number of processing threads' global configuration setting, as this will reduce the number of builds NCrunch is allowed to execute concurrently.

Thanks for the suggestion on the delay trigger - I'll continue to look at this as a long term option.


Cheers,

Remco
Mangust
#5 Posted : Friday, January 11, 2013 9:47:06 AM(UTC)
Rank: Member

Groups: Registered
Joined: 11/16/2012(UTC)
Posts: 25
Location: Norway

Was thanked: 4 time(s) in 4 post(s)
I definitely don't have any tests that do IO or db or anything like that. Only in memory execution so that cannot cause the problem. But as I told before after turning NCrunch off and on again I don't see this problems anymore... Though they funny thing is that it was slow right after I opened VS. And NCrunch should initialize there again. But it seems something went wrong and off/of fixed it :)
1 user thanked Mangust for this useful post.
Remco on 1/11/2013(UTC)
Remco
#6 Posted : Saturday, March 30, 2013 10:12:33 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
For anyone interested, the feature described above (a configurable delay trigger for NCrunch builds) has been introduced with the newly released version of NCrunch (v1.45), through the Sliding Build Delay global configuration setting.
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