Hi Peter,

can we improve the new classloader so that the work of inspecting the jars does not happen each time an <antcall/> is done ?

Antoine
Peter Reilly wrote:

Stefan Bodewig wrote:

Hi,

today I found myself discussing with the JPackage folks on their list
about the problems the RPM setup has with the new Launcher.

They put all the installed jars into a single directory and let config
files put together the classpath before they invoke Ant IIUC.

So far we've told people that the new Launcher would pull in all jars
from ANT_HOME/lib (and in addition from ~/.ant/lib, but we didn't say
that very loud) - but this is not true.  It pulls in all jars from the
directory containing ant-launcher.jar, no matter where it is.

In stock installs this is the same, but not in the RPM installation
where this behavior pulls in the whole Java universe.


This may have performance implications.
I was looking at slowdowns from 1.5 to 1.6. One issue is
<typedef resource="cpptasks.tasks"/>
This is slower in 1.6 than it is in 1.5. This is due to the new
classloader (I think). The new classloader added the jars in ${ant.home}/lib to the
classpath and also opens each jar looking for classpath information in it.
If the <typedef/> is at the top level, this happens each time an ant-call is
done - so a common idiom causes problems:


<project name="project">
<include name="common.xml"/> ( or &common;) <target name="compile-mains">
<foreach list="a,b,c,d,e,f,g,h,i" param="program" target="compile"/>
</target>
<target name="compile">
....
</target>
</project>



Where common.xml contains: <taskdef resource="net/sf/antcontrib/antcontrib.properties" /> <taskdef resource="cpptasks.tasks"/> <typedef resource="cpptasks.types"/>

Peter

I'm not convinced that we need to adjust anything, but it is an
interesting thing to note.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to