Benchmarking Thymeleaf 2.0
Benchmark definition
- Versions of Thymeleaf compared: 1.1.5 vs 2.0.0.
- Configuration:
- Dell Vostro V131 (laptop), Intel Core i5, 8Gbytes RAM
- Windows 7
- Java 6 (Standard Oracle VM)
- Tomcat 6.0 (launched from Maven 3)
- Requests launched from the ApacheBench tool (-c 25 -n 100000)
- Results collected using the TIMER log of Thymeleaf (measure only template engine execution)
- All other logs set to WARN
- Graphs created using averages of 1,000 executions for each point
- Tests:
- 1. GTVG Example Application (no Spring MVC), main page.
- 2. GTVG Example Application (no Spring MVC), order details page for orderId=2.
- 3. STSM Example Application (with Spring MVC), main page after adding one seedstarter for Thymus Vulgaris with 10 seeds.
All collected data can be obtained here.
Test 1
GTVG Example Application (no Spring MVC), main page.
Average execution times:
- Thymeleaf 1.1.5: 7494817.25 nanosecs - 7.49ms
- Thymeleaf 2.0.0: 0340849.58 nanosecs - 0.34ms
Test 2
GTVG Example Application (no Spring MVC), order details page for orderId=2.
Average execution times:
- Thymeleaf 1.1.5: 2178234.04 nanosecs - 2.18ms
- Thymeleaf 2.0.0: 0558972.67 nanosecs - 0.56ms
Test 3
STSM Example Application (with Spring MVC), main page after adding one seedstarter for "Thymus Vulgaris" with 10 seeds.
Average execution times:
- Thymeleaf 1.1.5 without cache: 9316346.24 nanosecs - 9.32ms
- Thymeleaf 2.0.0 without cache: 2040028.45 nanosecs - 2.04ms
- Thymeleaf 1.1.5 with cache: 4190066.93 nanosecs - 4.19ms
- Thymeleaf 2.0.0 with cache: 1260279.69 nanosecs - 1.26ms
