-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve performance of XPath linters using //* predicates #1197
Conversation
Ran a more thorough benchmark on
Produces the following verdict:
I'm reverting the implementations where "old" is faster, although not 100% sure for some implementations if that is just because of the relatively simple structure of the testcode. |
@MichaelChirico I've managed to halve the runtimes of |
On tools/QC.R:
|
Nice. Can you break that down by linter? |
Here's a fresh run on 4446242, using
|
it seems like most of the benefit here is from moving the xpath generation into the factory then? i am wary of readability...
also it looks like the benefits from optimizing |
The I suggest we try to move all XPaths to the factories if possible and try to make them as readable as possible. |
WDYT about the new Ready to merge IMO. |
agreed... that was trying too hard to avoid re-using |
Rewrote all
//*[(self::xxx or self::yyy) and zzz]
constructs to the faster//xxx[zzz] | //xxx[zzz]
XPath representation.