Skip to content

Commit e226c1c

Browse files
authored
Minor performance improvement with --useCquery (#181)
Computation transitions is slow and it's not necessary when trying to figure out list of compatible targets.
1 parent 3098e27 commit e226c1c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cli/src/main/kotlin/com/bazel_diff/bazel/BazelQueryService.kt

+4-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ class BazelQueryService(
7575
addAll(startupOptions)
7676
if (useCquery) {
7777
add("cquery")
78-
add("--transitions=lite")
78+
if (!outputCompatibleTargets) {
79+
// There is no need to query the transitions when querying for compatible targets.
80+
add("--transitions=lite")
81+
}
7982
} else {
8083
add("query")
8184
}

0 commit comments

Comments
 (0)