You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Krishnan Muthuswamy <kr...@hotmail.com> on 2004/09/10 23:01:17 UTC

Velocity Performance Related Queries

Hi,

I am designing a system which is using metadata to define UI. I have 
templates for various HTML elements (Button, Text Box, TextArea, CheckBox, 
RadioButton etc). At runtime, based on my view definition structure I merge 
the templates to get the final HTML. This is done one component at a time.

For this, I am initializing a new velocity context every time I render a 
component. I have set my velocity.properties to cache the templates by 
providing the following line

file.resource.loader.cache = true

For a medium sized Application Page (Around 25 - 30 elements) it is taking a 
good 1060 milliseconds to render on an average. I would like to hear your 
advice on how to improve the performance.

1. Will reusing the same VelocityContext for all the components help?
2. Is there any other property other than the cache that can be used to 
further improve the performance.
3. Are there any alternatives to this design approach (providing different 
templates for different components and merging them one at a time for each 
component)?
4. Is there anything else I can do to improve the performance?

I really need to get this display time to around 250 ms. Even that is high 
considering my goal of architectural overhead(Presentation, Security, and 
Service Execution) of 500 ms.

Any inputs on this will be greatly appreciated.

Thanks and Regds
Krish



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org