-
Notifications
You must be signed in to change notification settings - Fork 73
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
poor performance in DOMDifferenceEngine for large XMLs #236
Comments
Interesting. The code has not really been optimized in any way - in particular as big inputs will suffer from using DOM anyway. But if a simple change like this really speeds up things, this is wonderful. Any chance you could create a pull request? If not I'll take care of it myself, but it may take a bit longer. |
while porting the change to XMLUnit.NET I just realized I could safe keeping a reference to the temporary list now in -> aa329de |
checked with my usecases. significant improvement! thanks. |
great, thank you |
I'm in the process of releasing 2.8.4 but it seems Maven central is very slow right now - probably a lot of projects are cutting new releases right now. |
I'm comparing two large XMLs.
One parent element contains around 45000 children.
the multiple
List.indexOf()
-calls inorg.xmlunit.diff.DOMDifferenceEngine.compareNodeLists(Iterable<Node>, XPathContext, Iterable<Node>, XPathContext)
are quite expensive, since all lists contain 45000 elements, and should be replaced by a more performant data-structure.
since the data-structure seems to be 'immutable' for the matches-loop, constructing multiple Map<Node,Integer> instances that contain the indizes, cuts the required comparison-time in half for my local tests.
and use it like:
The text was updated successfully, but these errors were encountered: