Profiler for branch template

I am starting to optimize my website which is currently still running with a dev environment in Symfony2.

I have one page which is pretty weird. Page load in ~ 1000ms and branch template takes ~ 900ms based on symfony profiler.

I looked at the branch template, but it is quite large (many loops, including templates, etc.)

I would like to know what is taking many times in my template, so I am looking for a way to profile these templates. Is this possible and how?

+3


source to share


1 answer


With Symfony 2.4, in your branch template:



{% stopwatch "foo" %}
   ... some things that gets timed
{% endstopwatch %}

      

+4


source







All Articles