Nothing wrong from what you described.

However, how big is the Vector? Even for the original one, 35 seconds is
a lot! I could pump out a few M's html report for 35 seconds.

I would suspect sth. else is wrong.

 

David

 

 

________________________________

From: Withers John Z [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 27, 2005 2:17 PM
To: 'Velocity Users List'
Subject: Performance tuning and Velocity

 

Hello all.

 

I've just converted a stand-alone web server application from using
embedded 'println()' to using Velocity to produce output.  The results
display very well, but now I'm having some performance related issues.
For a given query from the applications input form, the 'antique'
version responds in 35 seconds while the Velocity version takes over 90
seconds to complete.  The difference increases as the number of items
are displayed.

 

I suspect my underlying approach for using Velocity is at fault here.
In both cases, the server application evaluates the users input data and
retrieves it from a data store (in this case, an LDAP server).  The
retrieved data is stored in a java.util.Vector.  This Vector is placed
in the VelocityContex.  The target template iterates through the vector
with a #foreach() and lays out each individual item from the Vector.  Is
there a better way to approach this issue?

 

Thanks!

 

 

Reply via email to