Edgewall Software

Version 5 (modified by Christian Boos, 8 years ago) ( diff )

not much to be seen for cobbler/jinja2, remove links + some updates

Add Support for the Jinja2 Template Engine

We've decided some time ago to remove support for the ClearSilver template engine, in Trac 0.12, but this didn't happen yet. Clearsilver had its share of inconveniences, enough that we decided to switch to the nicer Genshi template engine in 0.12, but it was very fast and memory lenient. While we managed to keep Genshi memory usage somewhat in control (remember #6614?), the speed was never really adequate, especially for big changesets and for displaying source files over a few thousand lines of code (see TracDev/Performance#Genshi for details).

So one solution would be to switch once again, to a template engine that would combine the advantages of Genshi (pure Python, nice templates, flexible) and ClearSilver (speed!). Such a beast seems to exist now: Jinja2.

The switch can happen progressively: instead of removing support for ClearSilver we could substitute that code by the support for Jinja2.

Several points remain to be clarified:

  • what will be the upgrade path for plugins that came to rely on IStreamFilters?
  • how to handle themeing?
  • should we rewrite tag builders or use lightweight string templates?
  • others?

See also this Trac-Dev discussion from 2010, which is still pertinent. Well, obviously we managed to release Genshi 0.6 since then, but the issue is a recurring one, see this recent (2016-01) Genshi question on Trac-Users.

Note: See TracWiki for help on using the wiki.