Wichert Akkerman wrote:
> On 11/29/08 10:47 AM, Malthe Borch wrote:
>> I've also corrected a benchmark comparing performance between
>> preparing Chameleon and ZPT for rendering (e.g. parsing/compilation
>> steps). Chameleon is still quite slow on a cold boot (30 times
>> slower), but when the cache is used (e.g. "warm boot"), there's only a
>> factor of 1.25 to differ.
> How do I interpret that? Is chameleon only 1.25 faster than zpt when
> rendering, or is there a compile penalty at every render?
No. This test only compares compilation and has nothing to do with
rendering speed. Since we have class level caches in place, the
compilation is only ever done once, no matter if you use persistent
cache files or not.
Rendering speed is still anywhere between 2x to 20x faster depending on
the actual template.
The 1.25x factor means: If you use a persistent filesystem cache which
stores the compiled templates as pickles, the time it takes to load
those pickles and execute them is 1.25 times slower in chameleon, than
it takes ZPT to parse a template and generate the program code for it.
The 30x slower factor included the time it takes chameleon to load the
template, parse it via lxml, create an AST and turn it into byte-code,
eventually pickling it to the file system for caching purposes.
The persistent cache is there to cut down startup time for new
processes, which is quite useful in development.
You received this message because you are subscribed to the Google Groups
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at