Open vbrouet opened 1 month ago
What is the performance impact of the runtime check combined with yield ?
Originally posted by @stof in https://github.com/twigphp/Twig/pull/3999#pullrequestreview-1875847101
Hello,
While investigating a performance regression in a symfony app (6.4) I found that the source was twig/twig version 3.9.0.
I made a small repro and used git bissect to find this pull request #3999 where performance is briefly discussed.
After some trial and error, performance was partially restored by passing 'use_yield' => true to the twig Environment constructor.
'use_yield' => true
Not sure if this is a bug but in certain cases the performance impact was pretty huge (from 800 ms to 2200ms).
Probably related to this discussion I opened a few days ago
Originally posted by @stof in https://github.com/twigphp/Twig/pull/3999#pullrequestreview-1875847101
Hello,
While investigating a performance regression in a symfony app (6.4) I found that the source was twig/twig version 3.9.0.
I made a small repro and used git bissect to find this pull request #3999 where performance is briefly discussed.
After some trial and error, performance was partially restored by passing
'use_yield' => true
to the twig Environment constructor.Not sure if this is a bug but in certain cases the performance impact was pretty huge (from 800 ms to 2200ms).