What affects compile speed? and how can the time needed to compile be optimized? As my project grows it takes longer to compile… what can be done?
Use Jikes: http://oss.software.ibm.com/developerworks/opensource/jikes/
It’s free, it’s very fast and has much more friendly and easier to understand error messagess. Many IDEs can use it too.
Also, if your use Ant as you build tool it can incrementally compile (among many other things) and it can use jikes.
If you’re hoping to use something to build whatever you’re working that has the custom classloaders I would recomend Ant. While using an IDE as a build tool can work it won’t have the flexabiliity to setup and (re)package files like Ant.
Do the number of import statements matter and how specific they are?
i.e.
import thispackage.*;
vs.
import this.package.Thisclass;
Avoid ‘make’.
Typically Java apps compile very fast (compared e.g. with C++ projects). If you use a decent IDE, it should always be a matter of seconds.
What are the timescales you are talking about? Maybe there’s a principle mistake in your build process.
My project @work has by far >1000 classes and starts up within seconds from the IDE. A full rebuild takes some time (1minute or so?) but thats very rarely necessary.
[quote]Do the number of import statements matter and how specific they are?
[/quote]
Yes, but not by that much.
[quote] What are the timescales you are talking about?
[/quote]
We’re talking 5-7 seconds on a p2:650 mhz. At times I wish it were 1-3 seconds.