> But you have to recompile the Perl code, which normaly takes more time, then
> compiling the template to the Perl code. I don't think that this will gain
> very much speed. (Maybe in case of TT this is more important, because it has
> to first translate his own language to Perl code, while other only need to
> extract the Perl code)

Yes, that's it.  The parse from templates to Perl is the slowest part
of the cycle, so we aim to only ever do it once.  In a persistant server,
the template is cached as a reference to an anonymous sub-routine.  We 
also write it out to disk so that you can restart the server and then 
simply require() the template, rather than re-parsing it.  

The TT parser uses Perl regexen and an LALR state machine.  It is 
exceptionally fast (in comparison to the big-regex-hack that 
Text::Metatext used) but not as fast as letting Perl require() and
parse the file.  I'm working on a C/YACC version of the parser 
(as opposed to Perl/YAPP) which should be significantly faster
still.


A


Reply via email to