slow script performance using jruby-complete & ant

View: New views
1 Messages — Rating Filter:   Alert me  

slow script performance using jruby-complete & ant

by b2009 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I'm using ant 1.7.1 with jruby-complete-1.4.0RC1.jar via bsf.
My problem is that the jruby performance inside ant is very bad
(e.g. compared to a beanshell script).

The ant test file (see below) compares two simple scripts, and
here jruby is a factor 30x slower:

D:\>ant\bin\ant -f build.xml
   Buildfile: build.xml
   [stopwatch] [rubylist: 6.187 sec]
   [stopwatch] [beanlist: 0.203 sec]

Is there a way to improve the script-startup performance ?
We have lots of small jruby helper scripts inside ant and the
slow startup becomes the main bottleneck.

Thanks,

Stefan

Ant build.xml:
<project name="comparerubyvsbeanshell">

   <typedef resource="net/sf/antcontrib/antlib.xml" />

   <stopwatch name="rubylist" action="start"/>
   <for  
list="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"  
param="i">
     <sequential>
       <script  
language="ruby">$project.addReference("justdosomething1", "v1")</script>
     </sequential>
   </for>
   <stopwatch name="rubylist" action="total"/>

   <stopwatch name="beanlist" action="start"/>
   <for  
list="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"  
param="i">
     <sequential>
        <script  
language="beanshell">project.addReference("justdosomething1",  
"v1");</script>
     </sequential>
   </for>
   <stopwatch name="beanlist" action="total"/>

</project>



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email