Jinja2 is an awesome templating system! I've always been happy with the builtin templating framework in Django until about a week ago when I needed to render large amounts of tabular data. Then the Django templating system more or less breaks down because the rendering takes over 2 - 300 milliseconds which is to much time.
My first solution was to aggressively cache rendered pages using the cache middleware. Unfortunately that makes it hard to keep data changes in sync with what visitors see on the site. Plus, the first time the page is accessed is still slow.
The real solution was to throw out the old Django templates and start to learn Jinja2. It's not done yet, but I'm getting there. Meanwhile, here is a performance test that shows how much superior Jinja2 is:
Inga kommentarer:
Skicka en kommentar