Spring-MVC vs. raw Servlet: memory consumption, performance

佐手、 提交于 2020-01-02 04:01:09

问题


I was reading the question "Raw Servlet vs. Spring MVC" and was wondering if Spring MVC might slow down or blow up the memory consumption of your application compared with raw servlet?

Note: I originally asked it as a comment in the question mentioned above and was then kindly summoned to post it as a separate question.


回答1:


Define "blow up". Define "slow down".

Of course memory usage will be higher, and of course performance will be lower.

How much higher, and lower compared to the additional functionality and flexibility Spring provides is the real question, and not knowing anything about the hypothetical app, it's impossible to say.

Building a testable, extensible, well-architected servlet-only app would involved re-implementing a lot of the functionality Spring provides. Which would you prefer to do--re-implement some (essentially) industry-standard code to the same degree it's been implemented and then write your app, or just write your app? And which would your boss prefer you do?



来源:https://stackoverflow.com/questions/10790601/spring-mvc-vs-raw-servlet-memory-consumption-performance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!