velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tlecavel\.ml" <>
Subject Batch a template?
Date Thu, 18 May 2006 15:08:54 GMT

The process to evaluate a template is quite long and take many
ressources on the CPU. Is it possible to "batch" a template
with a set of different context to save time?

I explain: at this time a have a function that do something like:

  StringBuffer buffer = new StringBuffer();

  VelocityContext context = new VelocityContext(voContext);

  StringWriter w = new StringWriter();

  Velocity.evaluate(context, w,

  return buffer;

And this block is called about a hundred of times where only
voContext is modified. Is there a way to evaluate just once
the template and then give Velocity a list of context to treat?

Thanks for your help.

-- Thomas.

Accédez au courrier électronique de La Poste : ; 
3615 LAPOSTENET (0,34 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)

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

View raw message