velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krishnan Muthuswamy" <>
Subject RE: Velocity Performance Related Queries
Date Wed, 15 Sep 2004 15:57:14 GMT

Thanks for the suggestion. Changing the modificationCheckInterval to -1 did 
shave off a great 2000ms and now it takes around 1300 ms to render a page. I 
am having separate velocity template for each and every component and I 
changed them to separate velocity macros loading off of VM_global_library.vm 
and hence there is only one merge at the page level. Still it takes around 
the same time. (1300ms).

Are there any more suggestions on the velosity performance improvements in 
my scenario. I have to render a page in under 300 ms.

Thanks a bunch and Regds

----Original Message Follows----
From: Chris Rousseau <>
Reply-To: "Velocity Users List" <>
To: 'Velocity Users List' <>
Subject: RE: Velocity Performance Related Queries
Date: Fri, 10 Sep 2004 16:15:08 -0500

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:

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

View raw message