Commit 9c6adcb
Improve performance for transitive dependency checks
`TransitiveDependencyCondition` internally calls `contains()` recursively
on the collection of all objects to be tested. If this collection is a
large list and there are enough recursive calls to
`getDirectDependencyTargetsOutsideOfAnalyzedClasses()` this results in a
heavy performance impact. On a reasonable large project a single test
using that condition may take minutes to complete. Converting the given
list to a Set with much better `contains()` performance fixes this issue.
on-behalf-of: @e-solutions-GmbH <info@esolutions.de>
Signed-off-by: To6i <To6i@users.noreply.github.com>1 parent 54fae8d commit 9c6adcb
File tree
1 file changed
+3
-2
lines changed- archunit/src/main/java/com/tngtech/archunit/lang/conditions
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
0 commit comments