mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
2f5c9899a4088fce3bb6325d96232cd1978161e4
This PR was merged into the master branch.
Discussion
----------
Add static caching for Twig_Environment::getTemplateClass()
Coming from http://drupal.org/node/1979290.
```
=== baseline-views-field-twig..views-field-twig-static-cache compared (517896dc57c6e..5178989df1d0f):
ct : 116,895|115,892|-1,003|-0.9%
wt : 478,367|474,349|-4,018|-0.8%
cpu : 449,530|444,639|-4,891|-1.1%
mu : 17,447,208|17,453,200|5,992|0.0%
pmu : 17,658,176|17,664,136|5,960|0.0%
```
http://www.lionsad.de/xhprof-kit/xhprof/xhprof_html/?run1=517896dc57c6e&run2=5178989df1d0f&source=drupal-perf-cottser&extra=baseline-views-field-twig..views-field-twig-static-cache
We found that performance could be measurably improved when the same template is rendered multiple times in a request.
Commits
-------
4ae5385 Add static caching for Twig_Environment::getTemplateClass()
Twig, the flexible, fast, and secure template language for PHP
Twig is a template language for PHP, released under the new BSD license (code and documentation).
Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment.
More Information
Read the documentation for more information.
Description
Languages
PHP
99.9%
