Demo project to show different Java templating engines in combination with Spring boot MVC at https://ozkanpakdil.github.io/spring-comparing-template-engines/
View the Project on GitHub ozkanpakdil/spring-comparing-template-engines
lower is the better
Engine Name | Seconds |
---|---|
jsp | 6.557 |
velocity | 3.568 |
freemarker | 2.633 |
thymeleaf | 6.875 |
mustache | 2.961 |
jade | 3.544 |
pebble | 3.566 |
handlebars | 13.509 |
scalate | 3.402 |
httl | 3.464 |
chunk | 4.406 |
htmlFlow | 1.679 |
trimou | 2.044 |
rocker | 1.927 |
ickenham | 4.280 |
rythm | 3.551 |
groovy | 735.646 |
liqp | 9.262 |
kotlinx | 2.375 |
results taken from mvn and jvm :Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39) Maven home: /usr/share/apache-maven-3.8.8 Java version: 21.0.2, vendor: Eclipse Adoptium, runtime: /usr/lib/jvm/temurin-21-jdk-amd64 Default locale: en, platform encoding: UTF-8 OS name: “linux”, version: “6.5.0-1018-azure”, arch: “amd64”, family: “unix”
Runs performance test(ab -q -n 10000 -c 10 http://localhost:8080/TEMPLATE) from Github Actions and updates here.
If you are planning to use any template engine from the list, choose wisely, lowest is the best performance.