velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Brown" <bro...@reflexe.fr>
Subject Re: Improving performance (speed problems with Velocity)
Date Fri, 04 Jul 2003 15:42:04 GMT
> I think that "evaluate" doesn't cache anything.
>
> What is the reason you need so many templates?
>
> Cheers,
> -- Denis.

We've got an application that maps onto databases.  For each type of column
(INTEGER, VARCHAR, etc.), we map one of several templates (view as list,
text box, href, radio button, etc), which we can customise at runtime.  We
build HTML pages out of lots of little templates that we stick together to
build the final page.  This modular approach is the most suitable for our
application, which our end-users can customise as much as they want.

I know evaluate(...) doesn't cache anything.  I was looking for some sort of
cache for "parsed" templates, not for the template source (which we've
cached already), so that we can re-use our templates again and again,
applying different data ("contexts") each time we re-use the template,
without incurring any overhead from re-parsing.

- Chris

----- Original Message ----- 
From: "Denis" <bredelet@mac.com>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Friday, July 04, 2003 5:30 PM
Subject: Re: Improving performance (speed problems with Velocity)


Hi Chris

vendredi 4 juillet 2003, à 04:16  pm, Chris Brown a écrit :

> To get started with Velocity, we opted for the "evaluate" methods of
> the
> Velocity helper classes in the "app" package.  We create a new
> VelocityContext for each template, and use a string (retrieved from our
> HashMap) as our template.  This is pretty much the same approach as we
> had
> before.  Unfortunately, even on a small set of data, this is MUCH
> slower
> (2-3 times longer with only 100 or so templates).



---------------------------------------------------------------------
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