View previous topic :: View next topic |
Author |
Message |
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sat Apr 26, 2003 7:26 pm Post subject: |
|
|
if we talk about the compiled templates performance:
AFAIR there haven't been big changes in the code that is generated from 2.4.2 to 2.5.0 .
there have been changes in cvs after 2.5.0, though . custom-plugin calls have become a bit faster, but block-plugin calls got slightly slower recently, by the repeat-flag i added. but all these are very minor.
if we talk over smarty's compile-performance, this is something completely different, i must have a look into that. |
|
Back to top |
|
Wom.bat Smarty Pro
Joined: 24 Apr 2003 Posts: 107 Location: Munich, Germany
|
Posted: Sat Apr 26, 2003 7:43 pm Post subject: |
|
|
huh? really, tom?
can you give us the urls to the documents you read? sounds quite interesting...
-edit-
messju: I guess it's just natural if compile times grow as Smarty development is pushed further. If you ask me, this is not toooo critical, as compilations aren't done very often, so the time consumed is not the most important thing |
|
Back to top |
|
Tom Sommer Administrator
Joined: 16 Apr 2003 Posts: 47 Location: Denmark
|
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sat Apr 26, 2003 9:41 pm Post subject: |
|
|
okay, then i'd say, 2.5.0-cvs is a little bit faster then 2.5.0-final or 2.4.2.
plugin-function-names are resolved at compile-time now. until (including) 2.5.0-final they where resolved at display-time.
this means:
in 2.5.0-final {assign var=foo value=bar} is
echo $this->_plugins['function']['assign'][0](array('var' => 'foo','value' => 'bar'), $this) ;
in 2.5.0-cvs {assign var=foo value=bar} is
echo smarty_function_assign(array('var' => 'foo','value' => 'bar'), $this);
the difference is not huge, but measurable if you call 1000 assigns.
the same applies for block-plugins. but blocks got another little change that ate the perfomance-gain up again. so block's performance should be nearly equal between 2.5.0-final and 2.5.0-cvs .
OTOH there haven't been any other significant changes in the source-code that Smart_Compiler generates.
greetings
messju |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sat Apr 26, 2003 9:45 pm Post subject: |
|
|
maybe the performance hit you recognize is because of the fact, that
strip and config_load have been removed from the core. this means
less code to load for people who don't use it. but it means additional fileaccess, additional include, maybe additonal traversal of the $plugins_dir (if it is an array) for people who need it. |
|
Back to top |
|
Tom Sommer Administrator
Joined: 16 Apr 2003 Posts: 47 Location: Denmark
|
Posted: Sat Apr 26, 2003 9:49 pm Post subject: |
|
|
I don't really use config files for much, I use sections, variables (assign) and one or two custom-functions and html_options
I don't use blocks, since I can't understand what the diff between section and blocks are... maybe because I started out with templates using PHPLIB, which uses blocks a lot (in a strange way)
hmmm... |
|
Back to top |
|
rainco Smarty Rookie
Joined: 13 Oct 2003 Posts: 31 Location: Germany
|
Posted: Mon Dec 15, 2003 3:14 pm Post subject: |
|
|
hi!
for me, 2.6.0 is slightly slower than 2.5.0 and prior version. i heavily use plugins and config-files.
FYI: there is a very good benchmark suite in PEAR/Benchmark. easy to use, and comfortable. you can set markers, so you can exactly see which part of the code i how fast. |
|
Back to top |
|
ledrobster Smarty Rookie
Joined: 02 Jan 2004 Posts: 9
|
Posted: Mon Jan 05, 2004 5:28 pm Post subject: |
|
|
Im interested to know what are the optimizations I should look out for, I've been doing php code for a few months now and never really looked into optimization for it. I haven't done a benchmark on my developing site yet but just thought I'll ask for a few helpful hints first. |
|
Back to top |
|
rainco Smarty Rookie
Joined: 13 Oct 2003 Posts: 31 Location: Germany
|
Posted: Mon Jan 05, 2004 6:13 pm Post subject: |
|
|
I always use PEAR/Benchmark/Timer as I said before. Just check it out, its nice! |
|
Back to top |
|
ledrobster Smarty Rookie
Joined: 02 Jan 2004 Posts: 9
|
Posted: Fri Jan 16, 2004 8:23 pm Post subject: |
|
|
7.4s - 8.2s to load a page. I have 4 boxes getting news from rss feeds from other urls and 1 box gettin the weather from weather.com, is that a reasonable amount of time? I was thinking I might just store the information on file and get the server to update them on a time basis. Any thoughts or suggestions? Please advice, thank you. |
|
Back to top |
|
|