Any support for template precompilation? #145

Closed
GulinSS opened this Issue Aug 21, 2012 · 1 comment

Projects

None yet

3 participants

@GulinSS
GulinSS commented Aug 21, 2012

Here http://www.mail-archive.com/pocoo-libs@googlegroups.com/msg00288.html I readed that I can use precompilation for jinja2 templates, but this link is very old and code is unavailable for now.
Does jinja2 support template precompilation after 3 years?
How can I use it for my project for better performance?

@nuald
nuald commented Oct 24, 2012

You can use compile_templates() method and ModuleLoader: http://jinja.pocoo.org/docs/api/#jinja2.Environment.compile_templates

However, looks like bytecode cache is still faster.

@jeffwidman jeffwidman closed this Apr 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment