`XPath::query()` is much more efficient than `getElementByTagName()`
authorAlexander Ebert <ebert@woltlab.com>
Mon, 12 Apr 2021 19:42:29 +0000 (21:42 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 12 Apr 2021 19:42:29 +0000 (21:42 +0200)
commit76f66297178f7f7630a7655bfe2f99b052423f49
tree52f417e9c32ee3460652fa3c385b4e0eb2c0f439
parent366af48be47c97150bc93dfdeb82171f8c3e0b6b
`XPath::query()` is much more efficient than `getElementByTagName()`

The test document with ~8k elements took ~0.6s using `getElementsByTagName(*)`, but only 0.03s using `query("//*")`
wcfsetup/install/files/lib/system/html/node/AbstractHtmlNodeProcessor.class.php