1. Matt Hurne
  2. deepdiff

Commits

Matt Hurne  committed 49fa51a

Performance optimization

  • Participants
  • Parent commits 9d2a8ae
  • Branches default

Comments (0)

Files changed (1)

File engine/src/main/java/deepdiff/scope/SortedZipDiffScope.java

View file
                                     rightEntry.cleanup();
                                 }
                             }
+                        } else {
+                            // The entry is identical between the left and right, because the entry exists on both the
+                            // left and right sides with the same path and SHA-1 hash.  Remove the path from the path
+                            // set to avoid doing an unnecessary comparison.
+                            pathSet.remove(leftPath);
+                            CachedZipEntry leftEntry = leftEntries.get(leftPath);
+                            CachedZipEntry rightEntry = rightEntries.get(leftPath);
+                            leftEntry.cleanup();
+                            rightEntry.cleanup();
                         }
                     }
                 }