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?
The most important feature people often overlook is resource loader caching (off by default) which boosts performance quite a bit (file.resource.loader.cache
).
#parse
directive 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.