velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Wilson" <>
Subject Performance Question.
Date Fri, 10 Dec 2004 05:42:41 GMT
Im using Velocity to render a relatively complex template (about 100
substitutions).  Its working really nicely, but Im trying to optimise

Its taking about 50ms to render the template, but I was hoping I could
improve that by turning on caching.  Ideally Id like to load the templates
from the classpath, but when that didn't work I used the File version,
just to try and get some improvement.  I initted Velocity accordingly -

Properties p = new Properties();
p.setProperty("file.resource.loader.cache", "true");

Then I render my template using the following code :

VelocityContext context = new VelocityContext();
context.put("allRequests", allRequests);
/* lets render a template */
Velocity.mergeTemplate("xml/Template.xml", context, result );

Caching doesn't seem to make things any faster and I get the feeling Im
doing something fundamental wrong.

Apologies that this is a bit of a newbie question, but Ive read the
support group etc. and I just cant get any optimisation.  

Kindest regards,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message