Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Using xpath may improve querySelector performance #39

Open
poef opened this issue Nov 11, 2020 · 1 comment
Open

Using xpath may improve querySelector performance #39

poef opened this issue Nov 11, 2020 · 1 comment

Comments

@poef
Copy link

poef commented Nov 11, 2020

DomDocument has support for spatch selectors, which support most of the CSS selectors. By offloading the search to the builtin function, you should be able to get improve performance quite a bit here.

Take a look at an implementation here: https://github.com/Ariadne-CMS/arc-xml/blob/master/src/xml.php#L53

@ivopetkov
Copy link
Owner

Sounds really good! Thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants