Community
Participate
Working Groups
build F3 From Ryan Cooper's annotation on bug 20336: Running an empty ant script takes about 2 seconds. If we add the build kind variable and pass it through, and the script checks it and does nothing for the "wrong" kinds of builds, there will still be a 2 second delay for the "wrong" builds. With this in mind, are we gaining enough from adding the build kind variable to make it worthwhile to add it for 2.0? Or should we wait until we can add a full (checkbox) solution after 2.0?
About the 2 seconds problem. It does not seem alarming but we do need more investigation on it. Every time an Ant script is run we create a new classloader and put all the necessary JARs in the classpath (ant.jar, xerces.jar, etc...). Given it has to load all the necessary classes again and again it might be where the time is going. We do that for the uset to be able to extend the Ant classpath at runtime. But I agree there could be some kind of optimization in this area after 2.0.
Defer.
Reopening for investigation.
*** Bug 21594 has been marked as a duplicate of this bug. ***
Basic tests indicate that caching the classloader can improve the time of running a simple "Hello World" script in 2 to 3 times. Although it seems tempting to just go and change it we have to consider that Ant users usually run buildfiles using different VM instances. So, we can face some unexpected/untested behaviour from Ant and its tasks.
Rodrigo, can you please explain: "Ant users usually run buildfiles using different VM instances"? My understanding is that currently we always run in the same VM as Eclipse is running (a single instance).
I meant users that run Ant through the command line and not using any IDE. If a task was developed and always tested in this kind of environment there is possibility of side effects if we cache the classloader.
Changes in AntCorePlugin and AntRunner Please verify (Jared)
Verified. Much better.
This patch would probably solve another issue: If an Ant task is currently using the DB2 database, one cannot rerun the same Ant task later. The reason is that the DB2 driver depends on JNI. In other words, only one ClassLoader can use the driver. There's still a problem left: It doesn't seem to be possible that two plugins share the DB2 driver, at least not, if they have own ClassLoaders. For example, the Quantum plugin (http://quantum.sf.net) and the Ant plugin, have this problem.