From: Mark D. <Mar...@sa...> - 2005-06-10 14:32:38
|
Cobertura should only read/write the cobertura.ser file once for each = JVM you run. The file is accessed via some static methods and = variables. The first time coverage data is accessed by the instrumented = classes, the cobertura.ser file is read in and lingers in memory. The = file is flushed back to the disk when the JVM exits. So reading/writing cobertura.ser probably isn't slowing things down too = much (unless you're starting a whole bunch of JVMs, but that has its own = performance problems...) I'm sure there are things that could be done = to improve the speed of the instrumented classes, but I haven't had a = chance to delve into the wide world of Java profiling. Patches are always welcome :-) -Mark=20 > -----Original Message----- > From: cob...@li...=20 > [mailto:cob...@li...] On=20 > Behalf Of Nathan Johns > Sent: Thursday, June 09, 2005 9:37 PM > To: cob...@li... > Subject: [Cobertura-devel] Performance Issues - cobertura.ser >=20 > Hi, >=20 > It appears to me, though I haven't looked at the code, that every time > the cobertura.ser file is touched by a test for instrumentation the > entire file is read in, updated and then written back to disk. This > seems to be a hug performance hit when compared to running the test > without instrumentation. (in our case about 6-7 times slower, on a > build that take 15 minutes without instrumentation this makes it a > very long build cycle.) >=20 > Would it perhaps make more sense to append instrumentation data to the > cobertura.ser file (may need to be done a different way if > cobertura.ser is a serialized object(s)) and then process all this > data at reporting time to aggregate it into class statistics? >=20 > In other words for each test, when it reads in cobertura.ser and > writes it, it creates its own data either appended or in a separate > file, and these are all then merged at reporting time. This would > reduce disk access and speed up the testing phase and move some of the > overhead to when the reporting is done. >=20 > I suppose one possibility is to make use of different cobertura.ser > files for each module and merge them at the end? Would appreciate any > comments you might have. >=20 > Nathan Johns >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. How far=20 > can you shotput > a projector? How fast can you ride your desk chair down the=20 > office luge track? > If you want to score the big prize, get to know the little guy. =20 > Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20 > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel >=20 |