Skip to content

Commit fd6fe7f

Browse files
committed
Revert "fix(reporter): Fix a performance issue with generating SPDX reports"
This reverts commit ebc6fe0 in order to replace it with a more tailored fix. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent 7a7c0fd commit fd6fe7f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

model/src/main/kotlin/licenses/ResolvedLicenseInfo.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,14 @@ data class ResolvedLicenseInfo(
8888
resolvedLicense.locations.map { it.location.path }
8989
}
9090

91-
val applicablePathsCache = mutableMapOf<String, Map<String, Set<String>>>()
9291
val detectedLicenses = filterTo(mutableSetOf()) { resolvedLicense ->
9392
resolvedLicense.locations.any {
9493
val rootPath = (it.provenance as? RepositoryProvenance)?.vcsInfo?.path.orEmpty()
9594

96-
val applicableLicensePaths = applicablePathsCache.getOrPut(rootPath) {
97-
matcher.getApplicableLicenseFilesForDirectories(
98-
licensePaths,
99-
listOf(rootPath)
100-
)
101-
}
95+
val applicableLicensePaths = matcher.getApplicableLicenseFilesForDirectories(
96+
licensePaths,
97+
listOf(rootPath)
98+
)
10299

103100
val applicableLicenseFiles = applicableLicensePaths[rootPath].orEmpty()
104101

0 commit comments

Comments
 (0)