开发者

Servlet Performance: Generate Static Content Dynamically?

开发者 https://www.devze.com 2023-04-02 08:26 出处:网络
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 tem

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消