[Gllug] Make was Bison question

rich at annexia.org rich at annexia.org
Thu Dec 5 11:23:03 UTC 2002


On Thu, Dec 05, 2002 at 11:06:17AM +0000, Paul Roberts wrote:
> Pete Ryland <pdr at pdr.cx> writes:
> 
> > Nah, the problem lies with the fact that when you invoke javac on a .java
> > file, it will compile it *and all its dependencies*.  So, your for loop
> > above is slow, not just because javac is written in java, but because you
> > will end up compiling a lot of stuff multiple times.  This is what ant
> > fixes.
> 
> I may be wrong, but I thought javac worked like make, in that it only
> compiles code if the class file is out of date in relation to the
> source-code. Is that not right?

Probably true, but you still suffer the awful overhead of starting
up the JVM each time, so it's still going to be slow.

Ant tries to reduce this cost by running the Java compiler inside
its own JVM (and also by only running it the required number of times).

Of course the real issue here is that Java is so slow.

Rich.

-- 
Richard Jones, Red Hat Inc. (London, UK) http://www.redhat.com/software/ccm
http://www.annexia.org/ Freshmeat projects: http://freshmeat.net/users/rwmj

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list