Jump to content


Photo

Smarty++


  • Please log in to reply
8 replies to this topic

#1 daeken

daeken
  • Members
  • PipPip
  • Member
  • 22 posts
  • LocationChambersburg, PA

Posted 05 November 2003 - 12:12 AM

A few months ago, I embarked on a project called Smarty++ (or Smartypp), it\'s a C-based (for now... may be going with C++ for future versions, simply because of the `string\' class) Smarty templating engine extension port. Currently only static text and variables are supported, no other tags or fancy stuff.

To run a simple template 10000 times with standard Smarty, it takes 54 seconds on this box. With Smarty++, it took 9 seconds. This benchmark alone has satisfied me with my work so far, though i have much planned for the future.

Hopefully you\'ll find the current version useful. I\'ve only tested in Debian and Gentoo GNU/Linux, but it should work on windows with few (if any) modifications. Current code is available here: http://eqmoders.com/smartypp.tar.bz2 . If you find/fix any bugs or add on, please post here about your findings!

Happy hacking,
Lord Daeken M. BlackBlade
(Cody Brocious)
Black and white are all I see in my infancy.

#2 Onno

Onno
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 05 November 2003 - 08:47 AM

Smarty renders once. And then its all PHP code. It isn\'t meant to be render evry time.
learning by helping others. [br]PS. Free Software for ever!

#3 daeken

daeken
  • Members
  • PipPip
  • Member
  • 22 posts
  • LocationChambersburg, PA

Posted 05 November 2003 - 12:38 PM

Even with caching, it\'s much much slower than Smarty++... that benchmark was with caching set up properly :)
Black and white are all I see in my infancy.

#4 Onno

Onno
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 05 November 2003 - 12:47 PM

Well could you maybe make a small page or put the project under GPL or LGPL on the Sourceforge?

So I can better understand what your doing.


Onno

PS. I love smarty
learning by helping others. [br]PS. Free Software for ever!

#5 daeken

daeken
  • Members
  • PipPip
  • Member
  • 22 posts
  • LocationChambersburg, PA

Posted 06 November 2003 - 12:40 PM

hmm... perhaps i will later today.
Black and white are all I see in my infancy.

#6 catman

catman
  • Members
  • Pip
  • Newbie
  • 6 posts

Posted 08 November 2003 - 11:27 PM

Cool!
I love smarty. I\'m glad someone is finally going to try to turn Smarty into an extension.

I guess I\'m going to have to figure out how to compile it for windows or install linux. :?

Good Luck! :D
Are you ready to get Jolted? [br]www.getJolted.com

#7 Derek

Derek
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts
  • LocationTennessee

Posted 09 November 2003 - 03:06 AM

on windows you can more than likely look foreward to php_smartypp.dll.
function comment(s)

{

	if (i_know_what_to_do_shut_up_i_dont_need_your_help_mode) {
   return  	} else {    return s  	}  }
ext/skeleton/create_stubs, lines 40-47. - PHP Core

#8 catman

catman
  • Members
  • Pip
  • Newbie
  • 6 posts

Posted 09 November 2003 - 03:28 AM

Thanks
I will look forward to that :D
Keep up the good work!
Are you ready to get Jolted? [br]www.getJolted.com

#9 <?=$humour?>

<?=$humour?>
  • Members
  • Pip
  • Newbie
  • 6 posts
  • LocationBrisbane, AU

Posted 18 March 2005 - 07:03 AM

well it's only been 18 months, i was wondering what was happening on this front. Any news?
What I'd like to see:
- I'd like to see a PHP code checker that has the following line:
55 errors in 13 lines; error thrown [PHP_ERROR_SOD_OFF]; PHP has decided you're too stupid to use it, reformatting hard drive ( \ ).





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users