Servlet Performance: Generate Static Content Dynamically?
I have a web-page with content, which has to be generated. However, the generation could happen up-front, it's basically not more than generating multiple versions of the same file. I.e. I have a templat开发者_开发知识库e, which has to be filled with different property files.
Regarding performance, is it worth to pre-generate the files? Or should I run a servlet or JSP page and fill the template dynamically?
It would depend entirely on what your performance requirements are. For a typical webapp, put it in a JSP, and don't worry about it. Otherwise, do some profiling to determine exactly what your needs are for performance improvements.
精彩评论