php - Twig include performance with and without passing variables -


i wondering best perfomance-wise, using

{% include "_inc/template" %} 

or

{% include "_inc/template" {'foo': bar %} 

assuming foo variable used in _inc/template , it's available in global context.

will there significant difference in performance between 2 approaches, if include placed within for having ~50 loops?

i don't have direct answer question, can use profiler in dev toolbar see timeline of calls.

maybe try , tell us...

which version of symfony use? know in symfony > 2.7 timeline graph exist.

ps : maybe try too:

{% include 'template.html' {'foo': 'bar'} %} 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -