Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Performance decrease
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sat Apr 26, 2003 7:26 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Wom.bat
Smarty Pro


Joined: 24 Apr 2003
Posts: 107
Location: Munich, Germany

PostPosted: Sat Apr 26, 2003 7:43 pm    Post subject: Reply with quote

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 Wink
Back to top
View user's profile Send private message
Tom Sommer
Administrator


Joined: 16 Apr 2003
Posts: 47
Location: Denmark

PostPosted: Sat Apr 26, 2003 8:08 pm    Post subject: Reply with quote

I'm talking about how fast smarty is AFTER it's compiled...

with debugging, force_compile set to OFF (cache also off)

wombat > http://dev.tsn.dk/serendipity/archives/e_14.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sat Apr 26, 2003 9:41 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Sat Apr 26, 2003 9:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Tom Sommer
Administrator


Joined: 16 Apr 2003
Posts: 47
Location: Denmark

PostPosted: Sat Apr 26, 2003 9:49 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
rainco
Smarty Rookie


Joined: 13 Oct 2003
Posts: 31
Location: Germany

PostPosted: Mon Dec 15, 2003 3:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
ledrobster
Smarty Rookie


Joined: 02 Jan 2004
Posts: 9

PostPosted: Mon Jan 05, 2004 5:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
rainco
Smarty Rookie


Joined: 13 Oct 2003
Posts: 31
Location: Germany

PostPosted: Mon Jan 05, 2004 6:13 pm    Post subject: Reply with quote

I always use PEAR/Benchmark/Timer as I said before. Just check it out, its nice!
Back to top
View user's profile Send private message
ledrobster
Smarty Rookie


Joined: 02 Jan 2004
Posts: 9

PostPosted: Fri Jan 16, 2004 8:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty Development All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP