Skip to content

Commit

Permalink
Merge pull request #26 from JetBrains/baseline-perf
Browse files Browse the repository at this point in the history
Get rid of removeAll to boost baseline calculation performance
  • Loading branch information
hybloid authored Sep 4, 2024
2 parents ea5f1fa + a878405 commit 30847f9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ internal fun applyBaseline(report: Run, baseline: Run, options: Options): DiffSt
.forEach { result ->
//compare with all equal indicators
val matchedResults = result.equalIndicators.flatMap(reportIndex::getOrEmpty).toSet()
val removed = undecidedFromReport.removeAll(matchedResults)
var removed = false
for (matchedResult in matchedResults) {
removed = removed || undecidedFromReport.remove(matchedResult)
}

if (removed) {
//leads to eliminating problems with the same hash
Expand Down

0 comments on commit 30847f9

Please sign in to comment.