Spring slow performance on Web Templates website

It looks like Spring (Boot) performance is relatively low compared to other frameworks on the Web Platforms website Web Platform Tests . I looked at the source code ( JSON serialization ) and couldn't find anything strange. So I'm wondering if the poor performance is the cause of Tomcat or the card itself?

+3


source to share


1 answer


Slow? It looks like it is approximately in the middle of the rows. Which doesn't seem too bad considering that this is actually a structure. The definition of the framework for this set of benchmarks is very liberal, considering that it includes benchmarks for a fairly raw Undertow application and another for a raw servlet.

But given that the Spring test itself is running on Undertow, that won't be the reason for Tomcat. :)

Looking at the source for various tests, they don't really compare like how. For example, a Spring test project creates a standard layered application with ORMs mapped to JPA and Hibernate, reusable repository classes, etc.



On the other hand, a Wicket application has a controller with a JDBC call. It even uses a hand-cranked pattern to generate JSON. You could write your Spring application that way if you wanted to, but no one would be impressed.

The Undertow test again does little more than query the database with JDBC and spit out the response. Unsurprisingly, it will be faster than itself with a full fledged framework on top of it.

Of course they will hopefully get you thinking about your priorities when writing your application. Looking for a complete stack structure that allows you to write less code, provides various security features, helps you achieve code reuse, and makes your application more testable and maintainable? Or are you willing to sacrifice everything for speed?

+6


source







All Articles