PATCH: Speed up libgcj build
Bryce McKinlay
bryce@albatross.co.nz
Thu Oct 12 22:28:00 GMT 2000
This patch speeds up the .java->object file stage of the libgcj build
quite a lot. It appears that passing the -I flag to gcj forced it to
only parse .java source files and not use the already-built .class files
for its dependencies (which is much faster). With this, the time to
build java/lang/String.java, for example, goes from about 1.5 seconds to
90ms for me.
Random notes/question:
1. Running "sh ./libtool --mode=compile" for every single .java file is
now actually far slower than running the compiler itself. I really wish
we could avoid it.
2. Can someone remind me why the .java->.class stage was changed to run
gcj separately for every file? This is now the slowest part of the
compile by far. At least with the old way there was a chance that "gcj
-C" would one day be upgraded so that it produces .class files as it
traverses its dependencies (rather than parse all the source code again,
and again, and again...)
3. It would be really nice if we had proper dependencies for all the
.java files so changing one line of code doesn't cause the entire
library to be rebuilt...
regards
[ bryce ]
More information about the Java-patches
mailing list