wmde / Diff

䷂ Library for diffing, patching and representing differences between objects
BSD 3-Clause "New" or "Revised" License
200 stars 15 forks source link

Optimize Diff::isEmpty for performance #97

Closed thiemowmde closed 6 years ago

thiemowmde commented 6 years ago

This packports https://github.com/wmde/Diff/pull/89 as well as 52b315ff8df1ab4eb88316de950baa5c760b7bce to the 2.x branch.

Instead of always iterating the entire tree, stop immediately when at least one atomic diff operation was found.

I'm also removing the methods description, which is actually not true.