-
Notifications
You must be signed in to change notification settings - Fork 36
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
XML#nodes(String)
Method is Extremely Slow on Large Files
#288
Comments
@yegor256 Could you have a look, please? |
@volodya-lombrozo why do you think it may be faster? |
@yegor256 I showed it here: objectionary/lints#210 |
@volodya-lombrozo how can we fix here? Implement our own XPath machine? ) |
@yegor256 I haven't checked it yet. |
@volodya-lombrozo jcabi-xml is simply an adapter for XPath Factory from JDK. We don't make it any slower and we can't make it any faster. |
@yegor256 I'm not sure here. For now, it seems that you are right. However, I took a fast look on the code and have found that synchronized (this.cache) {
return (T) xpath.evaluate(query, this.cache, qname);
} This issue requires at least some investigation. |
btw 81% of time we usually spend in this part of the code I showed above. |
@volodya-lombrozo this one may be closed, I believe, in favor of https://github.com/volodya-lombrozo/xnav |
@yegor256 Yes, thank you! |
I have one large XML file and run the following java code on it:
It runs extremely long (minutes). Could you speed up this method, please?
Here is my XML:
Pointer.xmir.txt
XML
is instance ofXMLDocument
.The text was updated successfully, but these errors were encountered: