History log of /PHP-8.3/ext/dom/tests/reconcile_reused_namespace.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# a38e3c99 05-Jun-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix #79700: Bad performance with namespaced nodes due to wrong libxml assumption

* Use a prepending strategy instead of appending in dom_set_old_ns()

Looping to the end of the list

Fix #79700: Bad performance with namespaced nodes due to wrong libxml assumption

* Use a prepending strategy instead of appending in dom_set_old_ns()

Looping to the end of the list is wasteful. We can just put the new
nodes at the front of the list. I don't believe we can fully prepend,
because libxml2 may assume that the xml namespace is the first one, so
we'll put the new ones as the second one.

* Reuse namespaces from doc->oldNs if possible in dom_get_ns()

* Add a test for reconciling a reused namespace

* Explain why there can't be a cycle between oldNs and nsDef

Closes GH-11376.

Also fixes #77894.

show more ...