On Thu, 2005-09-08 at 09:13 +0300, Octavian Rasnita wrote: > > - Incorrectly configured template caching > > I don't know too much about caching, but I have just configured TT to create > cached templates, so I have used cache.
Usually mis-configured caching is the problem. If you call Template- >new() on every request, you are probably not using caching correctly. There is also the compile_dir setting which saves the compiled templates on disk, but that's a much smaller improvement. If you'd like to post the part of the code that calls TT, someone here can probably tell you if there's a problem with it. > Oh, and I have also used a few URI and HTML filters. (|URI | html) That's a bit slower than doing it ahead of time, but shouldn't be a big deal. > I have tested how much time takes to run for each piece of code, and just > before the last $tt->process(), the time was a half of the time needed to > run the entire program, so it doesn't matter how the program was made. CPU time, or wall clock time? > TT is a great templating engine but in my opinion is not very good for > beeing used with mod_perl or with programs that need running very fast. My experience has been that it's much faster than the rest of the things most programs need to do to generate content. > However, it might be important that I have made the tests under Windows... > Maybe under Unix the situation would not be the same. If you are not using the XS version of the Stash, you are not seeing the full speed. It makes a significant difference. I don't know if your Windows package had this or not. You can tell by looking in Template::Config for something setting $STASH = 'Template::Stash::XS'. - Perrin