News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Derick Rethans' Blog:
Twig extension
November 21, 2011 @ 08:35:39

In a new post from Derick Rethans he talks about an extension version of Twig, the popular templating engine from the creators of the Symfony framework.

A while ago, Fabien asked me to have a look at porting one of Twig's slowest methods, TwigTemplate::getAttribute(), into a PHP extension. It is a complex method that does a lot of different checks and look-ups. Fabien's benchmarks showed that this method was responsible for quite a large amount of time. On top of that, it didn't seem that it could be optimised any further as PHP code itself.

He points to the twig-ext extension that's a reworked version of the "getAttribute" method from the tool and the performance gain (about 15%) it gives. Compiled templates will automatically call this new method in the extension. This update has already been merged into the main Twig repo.

0 comments voice your opinion now!
twig extension template language symfony speed


blog comments powered by Disqus

Similar Posts

Ilia Alshanetsky's Blog: PHP 5.2.0 RC1 Released!

PHPClasses.org: Lately in PHP, Episode 26 - Accelerating PHP 5.4 with updated PHP cache extensions

Eirik Hoem's Blog: Setting xsi:type for objects sent over SOAP (inheritance)

Perplexed Labs: Convert HTML to PDF in PHP (libwkhtmltox extension)

Symfony Blog: How to create an optimized version of your website for the iPhone in symfony 1.1


Community Events





Don't see your event here?
Let us know!


mvc version tool interview series introduction library update release community symfony voicesoftheelephpant framework podcast language composer opinion security package laravel

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework