Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 631
nexus Avatar asked May 28 '12 21:05

nexus


1 Answers

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?

like image 63
Dave Newton Avatar answered Sep 20 '22 12:09

Dave Newton