[Grok-dev] megrok.chameleon template engine
Uli Fouquet
uli at gnufix.de
Mon Feb 23 16:40:46 EST 2009
Hi there,
Martijn Faassen wrote:
> Thanks for doing this work Uli! I really like all the activity
> surrounding alternative template languages in Grok now. For a while I
> thought the work at the Neanderthal sprint to support other template
> languages was not really going to be used by anyone, as it was very
> quiet surrounding the topic, but it looks like things are changing.
It was really easy. Thanks to all who brought the templating-support
forward!
> Uli Fouquet wrote:
> > Wichert Akkerman wrote:
> >> Previously Uli Fouquet wrote:
> >>> It provides support for chameleon-driven Zope page templates and also
> >>> for Genshi templates. Chameleon is the template engine also used by
> >>> repoze.bft and it (chameleon) is said to be faster than regular Zope
> >>> page templates.
> >> By a factor of 12 currently if I remember correctly.
> >
> > Hm, currently I cannot reproduce such speedup. Maybe my implementation
> > is really bad or we have a more general problem with template-handling
> > in Grok/Zope.
>
> It could be that non-template handling time is dominating in your test
> application?
>
Of course! The template rendering time looks minimal compared with the
main publishing stuff.
But in my (silly, incomplete, non-authorative) profiling tests I only
compared the times for template rendering with following results
rendering the standard 'congratulations' template (no substitutions, no
TAL-expressions):
* with ZPT template: 2.10% (of whole request)
* with CPT template: 0.65% (of whole request)
If we reflect the profiler impact (> 50% of a request), this means that
we're talking about a piece that with regular ZPT eats more than 4.2% of
(non-profiling) request time while with CPT it costs you only about 1.3%
(for this particular template).
This, however, is far away from the 12x speedup I'd dream of (but, hey,
more than three times faster isn't _that_ bad, is it?).
> Anyway, I'd like to see lots more people doing lots more profiling with
> Grok so we can track down issues like this and gain a better
> understanding for where time is going now, and where we should spend
> efforts to make things faster.
I might start with a profiling HOWTO, that brings the pieces together
one needs.
Maybe we should share some statistics or graphics somewhere? On the
Grok-site maybe?
Best regars,
--
Uli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20090223/e5d08cb5/attachment.bin
More information about the Grok-dev
mailing list