velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Rousseau <>
Subject RE: Velocity Performance Related Queries
Date Fri, 10 Sep 2004 21:15:08 GMT
velocimacro.library.autoreload = false
file.resource.loader.cache = true
file.resource.loader.modificationCheckInterval = -1

We've found that these three settings work well in a production environment.
The first will help, assuming you have your controls in a macro library. The
second, you already have. The third basically tells Velocity not to waste
any time checking for modifications to update the cache.

Chris Rousseau
JDA Software Group, Inc.

-----Original Message-----
From: Krishnan Muthuswamy [] 
Sent: Friday, September 10, 2004 4:01 PM
Subject: Velocity Performance Related Queries


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

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

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

View raw message