velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jian chen <chenjian1...@gmail.com>
Subject Re: reading an array's length?
Date Fri, 18 Mar 2005 16:18:27 GMT
Hi,

I also used Array Tool before. However, looking at the source of it,
it appears to me that every time you call a method of the Array tool,
it creates a new instance of the array list internally, which is mild
performance problem.

So, now I tried to avoid using it. What I did is to use standard java
Arrays conversion to convert array to a list and then pass it to into
the template.

Just my 2 cents. 

Cheers,

Jian

On Fri, 18 Mar 2005 11:07:30 -0500, Mike Kienenberger
<mkienenb@alaska.net> wrote:
> Christofer 'boz' Jennings <boz@cox.net> wrote:
> > Is there a binary for ArrayTool somewhere or do I just build it?
> >
> > And how would it get configured programmatically (eg.
> > velocity.setProperty())?
> 
> It's included with the latest (cvs) Velocity tools, I think.
> 
> It's also available on the Velocity Wiki.
> 
> http://wiki.apache.org/jakarta-velocity/ArrayTool
> 
> It's easy enough to just add it to your project as another java file (that's
> what I'd do).
> 
> To use it, either configure it via toolbox.xml (if you're using that) or
> just do a velocityContext.put("arrayTool", new ArrayTool());
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message