-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #4216 Swap BC layer for yield-ready and reclaim perf loss (ni…
…colas-grekas) This PR was merged into the 3.x branch. Discussion ---------- Swap BC layer for yield-ready and reclaim perf loss Follows #3999 Fix #4146 Fix #4103 When `use_yield` is set to false (the default), this PR reverts the implementation of the `render()` method to use a wrapping output buffer instead of hooking between each steps of generators. In this mode, the behavior of the yield method is not "pure": it triggers a mix of yield and echo. But this is fine for render and display methods. When `use_yield` is set to `true`, we skip that wrapping output buffer. This makes twig compatible with fibers (and this also makes compilation fail if a non-YieldReady extension is found.) That makes the name of the option not ideal, but BC rulez FTW. Commits ------- 5d1a19a Swap BC layer for yield-ready and reclaim perf loss
- Loading branch information
Showing
2 changed files
with
60 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters