Re: [macker-developer] Patch to help running in a forked JVM under Ant
Brought to you by:
barredijkstra,
melquiades
From: Paul C. <can...@po...> - 2003-11-17 05:33:35
|
Ross -- Thanks a bundle! Looks like a great patch. I should find some time to apply it this week. I know that Macker doesn't scale to very large projects all that well. I can make some guesses about where the memory is going, but it would be nice to do some serious profiling and find out for sure. I've never given it any serious optimization attention, so perhaps now is the time.... Does anybody on the list have profiling tools / expertise? Just out of curiosity, how large is the project you're running it on -- how many classes? Thanks again for the patch. Cheers, Paul On Saturday, November 15, 2003, at 10:58 PM, Ross Burnett wrote: > Hi, > > Congratulations & many thanks for Macker, it is a useful tool to have! > > After experimenting with it for a while I'm now integrating it an Ant > build environment, and in doing so I've found a couple of issues: > > 1. Macker slows to a crawl as its memory usage approaches the JVM's > max. > In other ant tasks (eg. javadoc) this is normally solved by forking off > a new JVM with a large maximum memory. While macker supports forking, > it > doesn't provide a way to set the max memory for the new JVM. > > (I realise I can increase the memory of the original Ant JVM using > something like ANT_OPTS=-Xmx256M, but I prefer to keep the Ant > environment as standard as possible: the less developers have to alter > the better) > > 2. When forking a new JVM, the macker ant task adds the name of every > class file as an argument to the new process. This fails with a largish > number of classes, presumably due to the command line being too long. > > Attached is a patch that aims to solve these issues by doing the > following simple things: > > a. Adding an optional 'maxmemory' attribute to the macker ant task so > that the max memory of the forked JVM can be specified. > > b. Adding support for an indirect input file to macker. A command line > argument of the form '@file' means that each line in 'file' identifies > a > class file to process. > > c. Updating the macker ant task so that when forking a new JVM it > passes > the list of class files via a temporary @file, rather than listing them > all on the command line. > > The patch was made against the CVS sources as at Sun Nov 16 04:44:14 > UTC > 2003, using 'cvs diff -b -c'. Please let me know if I should submit > the > proposed changes in some other way. > > Regards, > > Ross Burnett |