Files
Twig/doc
Fabien Potencier a60a522105 feature #1597 added a profiler (fabpot)
This PR was merged into the 1.17-dev branch.

Discussion
----------

added a profiler

This profiler allows to better understand what's going on when rendering templates. It should be used when debug is true only as it adds some overhead.

Here is a sample output in the text format:

```
main 567.04ms/100%
└ index 463.28ms/82%
  └ base 463.24ms/82%
    └ base::block(header)
    └ index::block(content) 306.29ms/54%
    │ └ included 50.18ms/9%
    │ └ included 45.42ms/8%
    │ └ included 35.42ms/6%
    │ └ base::block(content) 104.97ms/19%
    │ │ └ included 34.90ms/6%
    │ └ included 35.84ms/6%
    └ base::block(footer) 156.84ms/28%
      └ included 38.96ms/7%
      └ base::macro(foo)
```

You can also dump a profile in a Blackfire compatible format to [visualise the data as a graph](http://goo.gl/RwNGFH).

A profile is also a great way to be able to list all templates/blocks/macros that were used when rendering a template.

A PR on Symfony (symfony/symfony#13428) integrates this profiler in the Symfony web profiler to replace the current TimedTwigEngine and to add a new Twig panel.

![symfony-web-profiler](https://cloud.githubusercontent.com/assets/47313/5755461/019cd6a4-9ca5-11e4-8762-68e2a709c336.png)

Commits
-------

4408caa added a profiler
2015-01-20 03:09:25 +01:00
..
2015-01-20 03:07:54 +01:00
2014-12-16 11:00:43 +01:00
2015-01-18 14:12:20 +01:00
2015-01-20 03:04:00 +01:00
2014-10-21 16:58:01 +02:00
2014-10-21 16:58:01 +02:00