We are using Apache Velocity for website templates and some of them are getting complex. Have you noticed any performance issues with certain Velocity features? And how did you get around them?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The most important feature people often overlook is resource loader caching (off by default) which boosts performance quite a bit (
file.resource.loader.cache).#parsedirective also has noticeable performance impact, try to use it only to avoid code duplication, not to just split templates into logical parts.If your templates becoming quite complex in terms of logic maybe it would be possible to shift that logic to a controller and provide a template with ready to render data structure.
I didn’t notice any performance drops from Velocity, when I was testing Velocity speed before switching from JSP they were constantly 50% faster on any template I threw at them. Currently we generate sites with thousands of pages rendered from Velocity templates and it is lightning fast, very satisfied with performance.