Re: HTML_Template_Sigma again
| From: | Alexey Borzov | Date: | Wed, 26 Mar 2003 18:56:07 +0000 |
| Subject: | Re: HTML_Template_Sigma again | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14643@lists.php.net to get a copy of this message | ||
Fabien MARTY wrote:
Could you provide a complete bench script (1 php file + 1 template file) for html_template_sigma ?I didn't make a full-scale benchmark, just some simple profiling to show that caching does *significantly* increase performance. The script consists of a class instantiation, one loadTemplatefile() and five addBlockfile() calls. That's all. As for the template files, they are real templates from a real project. You are most welcome to use your own real templates or create some artificial ones.
I would like to make some benchs of your integrated cache solution...If you want to compare the performance of a built-in cache with a HTML_Template_ITX + Cache_Lite based solution (which I presume you want to do, as you are the lead developer of the latter), you'd have to address the following: 1) 'Cache' is invalidated based on source file modification time. When I evaluated Cache_Lite usage, I found out that there is currently no easy way to mimic this behaviour, you'd have to write some new code (or borrow some from my implementation) 2) You should also measure the time of parsing PHP code. Right now HTML_Template_Sigma.php is essentially the same size as HTML_Template_IT's three files.
PS : Yes, I can write these bench script myself. However, I want to be sure that the script is html_template_sigma optimized...I am not writing another MySQL, so its no need to make benchmark scripts optimized. ;] The only thing you should consider is doing setOption('trim_on_save', false) after class instantiation, especially if you are going to use ab tool for benchmarking. P.S. I once again have to remind that my class was essentially accepted to PEAR and that right now I am asking people to approve its name or voice their objections.