Benchmark

The benchmark is based on generating HTML output for some reasons:

Table of Contents

The Domain Model

To see some real-word work done the benchmark is based on a domain model that is slightly more challenging that the typical "list of domain object" task. We will use a simple address book example:

benchmark_model.png

What is measured

The focus of the benchmark shall be the pure rendering performance of the template engine, i.e. we are not interested in request handling time, network latency or anything else that is out of scope of the template engine. As rendering we consider the process of writing the output. The resulting web page will look like this example. Not very pretty but it will suite our needs.

Benchmarks

Configuration

The benchmark was locally executed on the following setup:

Web ContainerApache Tomcat/7.0.21
JVM Version1.7.0_09-b05
JVM VendorOracle
OS NameLinux
OS Version3.2.0-4-amd64
OS Architectureamd64

Result

The benchmark captured the minimum, maximum and average rendering time of 50 HTTP requests:

TestCallsmin. [msec]avg. [msec]max. [msec]
Toxic500.891.552.53
JSP500.912.309.76

Don't overestimate this benchmark! It's a quick and dirty hack without too much background research. The intent is to see if Toxic's performance is comparable to others.

Footnotes:

1 OK, if only the template engine is efficient in an environment as complex as a web container this won't help. But if each of the components doesn't care for efficiency for the "me alone cannot fix it" argument you will end up with the sum of all inefficiencies.

Author: Marcus Perlick

Date: May 25, 2014

HTML generated with emacs org-mode & Toxic by [qb]