Re: [SMARTY] Benchmarking cache and inserts
| From: | Paul Lockaby | Date: | Fri, 06 Jun 2003 15:27:12 +0000 |
| Subject: | Re: [SMARTY] Benchmarking cache and inserts | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9662@lists.php.net to get a copy of this message | ||
Nino Katic wrote:
Ok, i played a little with this and this is what i got.. Starting page had 3 inserts, caching turned on and it was already cached on disk. The time for processing the page was cca. 0,69 sec. Then i deleted cache on the disk and the time was cca. 0,74 sec. At the end i reorganized things. There were no inserts and the caching was turned off. The time was cca. 0,75 sec. Can you comment this results? In general is this time too big for some site that will have ultrabig load ? NinoTo begin with, render times vary widely depending on which server you're running the script on. For instance, at work when I use a 1.2GHz machine, it's faster than at home on my 466MHz or my 233MHz machine. They're all relative. With that said, I am surprised that you are not getting a faster render time with caching enabled. It is true that you can have each insert load another template and specify a different cache time (I have done this before and it did significantly increase render time, much more than you are reporting). So, In reality I find your render times to be incredibly high, and that is one of the problems I have with Smarty: a huge overhead. One thing to note is that you might want to test the script from the command line to eliminate any transmission slowdowns. Also, I find this script right here to be a good timer: $timeparts = explode(" ",microtime()); $starttime = $timeparts[1].substr($timeparts[0],1); // ... execute script ... $timeparts = explode(" ",microtime()); $endtime = $timeparts[1].substr($timeparts[0],1); echo bcsub($endtime,$starttime,6); Hope that gave you some good information. -Paul -- Paul Lockaby paul@paullockaby.com http://www.paullockaby.com