mitsuhiko/flask — pull request #876 by defuz (2013-09-30 18:09:10+00:00)
Title: Add TEMPLATES_AUTO_RELOAD config key

I added `TEMPLATES_AUTO_RELOAD` config option which allows to set `auto_reload` attribute of `jinja2.Environment` to `False` when the application is running in non-debug mode. This allows to make the template rendering a little more efficient because it disables checking of templates file changing each time when template is requested (usually this is not necessary on production).

In some situations, this may result in significant performance gains (from 60 to 200 rps in my case). Unfortunately, to do the same by overriding `Flask.jinja_options` attribute is uncomfortable because templates reloading needed for debugging.

This change should not affect existing applications. Also, it might make sense to disable reloading by default.