Compiling java under Windows XP is SLOW
Hi,
I'm involved in developing a java based web application, and we're experiencing speed problems compiling java under windows.
The entire project can be rebuilt in 90 seconds on a linux machine, but takes 6-10 minutes on the same or similar machines running Windows XP. We are seeing this problem consistently across all of our machines (3 linux, 3 windows).
Configurations are as follows:
Linux: Debian/Suse
Compile time: 90 seconds
Java: 1.4.2 (Sun)
Windows: XP sp1/sp2
Compile time: 6-10 minutes (depending on machine)
Java: 1.4.2 (Sun)
CPU: 100% (not an IO problem)
Questions:
1. Is there anybody else out there with this problem?
2. Are there any specific known issues on windows (ie XP's security model) which cause java compiling to run slowly? Are there work arounds?
3. Is there another java compiler we could use under windows to improve performance? I'm about to have a look at Jikes but am not sure if it supports all of java 1.4.
Cheers,
Randomman.
[1070 byte] By [
randomman] at [2007-9-30 16:30:14]

In the instances where it takes a long time I am doing a complete build (ie deleting all the class files before compiling). If I don't delete the class files before compiling, it is much faster.
But every now and then a clean build needs to be done, and I would expect that it should run at about the same speed on linux and windows.
Cheers.
Hi,I'm not quite sure what you mean by "configuration control". Are you talking about version control? If so, then yes we're using CVS, but since all the files are checked out onto a local file system as .java files, CVS plays no part during compilation.
Well I've found the problem.
Our ant build script was faulty. It included all java files from our project in the classpath. This resulted in a HUGE classpath, which windows could not handle. It appears that the file system had a lot to do with the speed (EXT2 seems to be faster then reiserfs is way faster then ntfs)
End result:
Linux: 30-50 seconds (down from 90 seconds)
Windows: 90 seconds (down from 6-10 minutes)
Everybody is happy.
Daniel.
Another factor is AntiVirus software. Because of the increasing number of viruses hiding in Jars and class files, most AntiVirus software routinely scans any .jar or .class files that are opened or written. Since you're rarely running any AntiVirus software on Linux, you'll notice a difference.
If you're confident that you're not likely to be infected with a Jar or Class-based virus, you can ask your AntiVirus software to disable automatic checking of those file types. That'll speed up compilation a fair amount. But caveat emptor..