libxml2: linearly optimize XPath expressions.
Some XPath expression nodes keep a back pointer to the last/previous
expression node for optimization purposes. Such pointers will result
in repeated work when walking over the expression
tree/graph, peephole optimizing it. Unacceptable amounts of repeated
work as the expression tree becomes deeper.
Avoid by marking the expression nodes during the optimization pass.
R=scottmg
BUG=573768
Review URL: https://codereview.chromium.org/1562133002
Cr-Commit-Position: refs/heads/master@{#369733}
2 files changed