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

Spring template engine performance tests

taken at Sun Nov 6 17:31:15 UTC 2022

lower is the better

Engine Name Seconds
jsp 4.270
velocity 3.376
freemarker 3.332
thymeleaf 7.027
mustache 3.498
jade 135.446
pebble 4.457
handlebars 18.060
scalate 7.881
httl 3.683
chunk 3.653
htmlFlow 2.539
trimou 2.852
rocker 2.785
ickenham 5.425
rythm 3.594
groovy 865.177
liqp 7.760
kotlinx 3.462

results taken from mvn and jvm :Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /usr/share/apache-maven-3.8.6 Java version:, vendor: Eclipse Adoptium, runtime: /usr/lib/jvm/temurin-17-jdk-amd64 Default locale: en, platform encoding: UTF-8 OS name: “linux”, version: “5.15.0-1022-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.