Im using Velocity to render a relatively complex template (about 100 substitutions). Its working really nicely, but Im trying to optimise performance.
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("resource.loader","file"); p.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.FileResourceLoader"); p.setProperty("file.resource.loader.cache", "true"); Velocity.init(p); 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, Andrew. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]