Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python.announce > #251 > unrolled thread

Genshi Compiler - Speed up your XML templates

Started byFerenczi Viktor <viktor@ferenczi.eu>
First post2011-07-17 01:00 +0200
Last post2011-07-17 01:00 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python.announce


Contents

  Genshi Compiler - Speed up your XML templates Ferenczi Viktor <viktor@ferenczi.eu> - 2011-07-17 01:00 +0200

#251 — Genshi Compiler - Speed up your XML templates

FromFerenczi Viktor <viktor@ferenczi.eu>
Date2011-07-17 01:00 +0200
SubjectGenshi Compiler - Speed up your XML templates
Message-ID<mailman.1169.1310910773.1164.python-announce-list@python.org>
Genshi Compiler 0.1.1
=====================

I'm pleased to announce the first public release of Genshi Compiler!

Project  home: http://code.google.com/p/genshi-compiler/
Download here: http://code.google.com/p/genshi-compiler/downloads/

PyPI entry: http://pypi.python.org/pypi/genshi_compiler

License: MIT software license

Quality: Beta with good unit test coverage

Genshi Compiler allows for rendering your Genshi template to Python
source code. You can save the code as a Python module or compile it into
a directly usable module object in memory. Just call the render function
on the module with your template parameters to render the whole template
or any of your template functions to render those fragments separately.

According to my initial benchmarks the rendering speed is typically ~40x
faster than doing the same using Genshi. There is a cost of this
speedup, certainly. Some of Genshi's dynamic features are not available,
most notably anything that depends on a template loader (xi:include),
the XML element tree representation (py:match) or the token stream.

If you've read this far, then I guess you want to see the tutorial:
http://code.google.com/p/genshi-compiler/wiki/tutorial

Regards,
Viktor Ferenczi

[toc] | [standalone]


Back to top | Article view | comp.lang.python.announce


csiph-web