What is the fastest template system for Python? Django, Kid, Genshi are quite slow in compare to those used in this post. The benchmark is based on
wheezy.template big table test for rendering a 10x1000 HTML table in unicode. Latest available versions as of this writing:
- chameleon 2.9.2
- cheetah 2.4.4
- django 1.4.1
- jinja2 2.6
- mako 0.7.2
- tenjin 1.1.1
- tornado 2.4
- web2py 2.0.9
- wheezy.template 0.1.125
Let setup virtualenv environment:
virtualenv env
env/bin/easy_install -O2 chameleon cheetah django \
jinja2 mako tenjin webext tornado wheezy.html \
wheezy.template
Download
bigtable.py test:
wget https://bitbucket.org/akorn/wheezy.template/raw/tip/demos/bigtable/bigtable.py
And run it:
env/bin/python bigtable.py