Will be dipping my fingers in this heavily tommorow as well, although I may wait if your actively modifying features tommorow
smarty template engine??
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Well, here is another speed test for compiling.

In this test the main.tpl is a 71k template file that is fairly complex. It takes Smarty 0.8 seconds and Template Lite 0.2 seconds to compile the same file. Template Lite outputs a slightly smaller compiled file. Smarty outputs a 93k compiled template while Template Lite outputs a 90k compiled template.

In this test the main.tpl is a 71k template file that is fairly complex. It takes Smarty 0.8 seconds and Template Lite 0.2 seconds to compile the same file. Template Lite outputs a slightly smaller compiled file. Smarty outputs a 93k compiled template while Template Lite outputs a 90k compiled template.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
This app is awesome. The directory problem I was having is that the owner of the compiled and cached folders needs to be 'apache' instead of 'nobody'. Now it works like a charm. I have it set to run through a few tests, some arrays, some conditionals and the like and it is spitting the compiled template out in 0.0029 seconds. I am very pleased. Well done Panama Jack. I think I found my template engine
.
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Downloaded 1.80 and uploaded it. It is working great. One question... was something changed in the parsing of the templates? I noticed the tests that were returning times of about 0.0029 seconds in 1.70 are now returning times of 0.0035 seconds. This is not a major decrease in performance. I was just wondering.
Thanks again. I am so liking this app. On a side note, I heard phpBB is going to be rolling out an instance of Smarty with phpBB 3 (Olympus) as a replacement for their current template parser. Does anyone know if they have given any consideration to Template Lite?
Thanks again. I am so liking this app. On a side note, I heard phpBB is going to be rolling out an instance of Smarty with phpBB 3 (Olympus) as a replacement for their current template parser. Does anyone know if they have given any consideration to Template Lite?
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm
Thanks
It has been fun this past month trying to get Template Lite as compatible as possible with Smarty while keeping it small and fast.
There may be a little extra slowdown due to the changes I had to make to the debug code. If I could leave out the debug code it would almost be a straight include of the pre-compiled template.
Now if you are talking about the compile time for compiling a file the very first time that is because of the new _get_plugin_dir() function that can scan through a list of directories looking for a specified plugin. This method is a little slower than the old method that only knew about one directory to look into.
I had to add multiple plugin directory support to be compatible with Smarty. Some commercial applications that use smarty require that ability.
There were some code changes made to variable parsing that may be a tad slower due to the added code checks.
There may be a little extra slowdown due to the changes I had to make to the debug code. If I could leave out the debug code it would almost be a straight include of the pre-compiled template.
Now if you are talking about the compile time for compiling a file the very first time that is because of the new _get_plugin_dir() function that can scan through a list of directories looking for a specified plugin. This method is a little slower than the old method that only knew about one directory to look into.
I had to add multiple plugin directory support to be compatible with Smarty. Some commercial applications that use smarty require that ability.
There were some code changes made to variable parsing that may be a tad slower due to the added code checks.
- AKA Panama Jack
- Forum Regular
- Posts: 878
- Joined: Mon Nov 14, 2005 4:21 pm