mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-12 10:26:32 +00:00
3bc9686dc531dc2127ea90273352180261a4049e
This PR was merged into the 1.x branch.
Discussion
----------
Small optimization for Twig_NodeTraverser::traverseForVisitor
During traversing a node tree `Twig_NodeTraverser::traverseForVisitor` (`Twig_NodeVisitorInterface::leaveNode`) often returns a same child node (a same object). So, there is no need to set it back to its parent.
This PR adds a check if a child node was changed. With this check a lot of calls to `Twig_Node::setNode` will be skipped.
Closes #2665
Commits
-------
555d01f3 Small optimization for Twig_NodeTraverser::traverseForVisitor
…
…
Twig, the flexible, fast, and secure template language for PHP ============================================================== Twig is a template language for PHP, released under the new BSD license (code and documentation). Twig uses a syntax similar to the Django and Jinja template languages which inspired the Twig runtime environment. More Information ---------------- Read the `documentation`_ for more information. .. _documentation: http://twig.sensiolabs.org/documentation
Description
Languages
PHP
99.9%