Kenneth Falck's Blog

Web framework bootstrap performance comparison

Posted on 2009-07-13 by Kenneth Falck

This is a simple comparison of the bootstrap performance of some popular MVC web frameworks. The test is a simple "Hello World" application on each framework with no database operations. This measures the theoretical upper limit of what you can get out of each framework. It's basically equivalent to how much CPU the framework uses in the bootstrap process.

The "Hello World" is built with a two-layer template on each framework. A top-level template renders the HTML layout and an inner template renders the contents of the page (inside the body tag). The HTML title is passed as a parameter to the top-level template.

For comparison, plain PHP and plain Python results are also given to show the theoretical maximum of any framework written in those languages.

Plain PHP3255.11
Plain Python2590.83
ErlyWeb 0.7.2 (Erlang R12B-5)2840.34
Django 1.0.2 with Jinja 2.1.11000.32
CodeIgniter 1.7.1666.14
Yii Framework 1.0.7400.78
Zend Framework 1.8.4132.93

Testing was done on CentOS Linux 5.3, Apache 2.2.11, PHP 5.2.8 with APC bytecaching, Python 2.6.2, mod_python 3.3.1. Each framework was warmed up with ab -n 1000 -c 10 and then tested with ab -n 5000 -c 10.


  • Django is only about half as fast when using the built-in template engine with {% extends ... %}. Jinja2 doubles the bootstrap performance.
  • Yii Framework 1.0.7 seems to have severe performance problems, so 1.0.6 was used instead.
  • CodeIgniter does not support two-layer templates, so a separate "header" and "footer" template were used.

Update: The Yii Framework 1.0.7 performance problem can be fixed easily by touching the distribution files, which are dated in 2020 and are not cached by APC because of this.