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

decodeProperties() in compiled templates

 
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 3
View previous topic :: View next topic  
Author Message
ivoras
Smarty n00b


Joined: 22 Dec 2009
Posts: 3

PostPosted: Tue Dec 22, 2009 10:17 pm    Post subject: decodeProperties() in compiled templates Reply with quote

I'm looking at a compiled template generated by Smarty 3 (b5) and on the top see a line invoking $_smarty_tpl->decodeProperties() and passing it what looks like serialized PHP data in a string. I don't know and don't care what exactly this data is, but wouldn't it make more sense to just save it in the template as a direct PHP array constructor code?

I.e. instead of decodeProperties('a:1:{s:15:"file_dependency";a:1{s:10:"F384501455"...') why not write out direct PHP code, which would in this case probably be something like decodeProperties(array(array('file_dependancy",array('F384501455')...))).

Wouldn't it be faster to process via PHPs compiler and also play nicely with precompilers/optimizers/code caches?

I'm not overly familiar with Smarty 3 so this might be completely justified Smile
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Dec 23, 2009 8:29 am    Post subject: Reply with quote

This has been changed already internally and will be part of the next update.
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 3 All times are GMT
Page 1 of 1

 
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