improve load time

improve load time

I am running a suite of tests that requires the application be restarted many times. On average, app load times without NCover are ~ 1 min, while running with NCover are > 6 min. If I was running all tests within the same session, that extra 5 min would be no big deal, but in my case, I am running the app 37 times. The nature of the tests requires that the app be restarted that many times.

Is there a way to optimize the load time of NCover? Can NCover cache all of the assembly info, rather than load it up every time, even if there is no change?


RE: improve load time

It can't cache the data but you can tell NCover to only profile specific assemblies (or types in 3.0).

You may want to look at the //a option and give it the assembly list that you wish to log.

How many dll's are being loaded and how large are these dlls?

Joe


RE: improve load time

Do have any tips for how to improve load time? Or what to expect load times to be?

I am running some nunit tests under ncover in msbuild.

If I use the NUnit task, NUnit reports that the tests took 5 seconds and the entire build takes 25 seconds.

If I run under NCover, NUnit says the tests take 111 seconds but the entire build takes over 7 minutes.

(for comparison, I tried using the Exec task to run the NUnit.Console app directly and it took 7secs/41sec)

Some other info:

There are 8 tests assemblies and a total of about 20 assemblies under test - but I restrict coverage to just four assemblies which are between 100k and 600k in size.

I am gathering my timings on my smallest project; on the largest project, coverage adds about an hour in loading time to tests that take a couple of minutes to run without coverage.

Any suggestions you have will be gratefully appreciated.

Thanks in advance,

Kevin


RE: improve load time

which version of NCover are you using? load times improved significantly in v3.x from v2.x.


RE: improve load time

I am using 2.1.2. I'll try 3.x. Any idea when 3.x will be final?


RE: improve load time

we are planning to release 3.x around the ends of January


RE: improve load time

Yes, 3.x has much faster load times. My original post noted 6+ min load time for 2.x. I am getting 2+ min load times with version 3.


RE: improve load time

I just upgraded to the latest beta 3.0.9 and my load time on my biggest project went from an hour to so small it's not worth measuring.

Well done and thanks!

Kevin


RE: improve load time

Thank you for the feedback.

Joe