Skip to content

Commit

Permalink
Reduce rounds to 11. Add a comment about timings.
Browse files Browse the repository at this point in the history
On CI timings for complex-cycle are worse than my laptop (for 12 rounds):

ubuntu: acceptance.TestAccept/bundle/variables/complex-cycle (2.57s)
mac: acceptance.TestAccept/bundle/variables/complex-cycle (1.54s)
windows: acceptance.TestAccept/bundle/variables/complex-cycle (2.80s)
  • Loading branch information
denik committed Jan 16, 2025
1 parent c3ac311 commit d2c79c8
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion bundle/config/mutator/resolve_variable_references.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,22 @@ import (
"github.com/databricks/cli/libs/dyn/dynvar"
)

const maxResolutionRounds = 12
/*
For pathological cases, output and time grow exponentially.
On my laptop, timings for acceptance/bundle/variables/complex-cycle:
rounds time
9 0.10s
10 0.13s
11 0.27s
12 0.68s
13 1.98s
14 6.28s
15 21.70s
16 78.16s
*/
const maxResolutionRounds = 11

type resolveVariableReferences struct {
prefixes []string
Expand Down

0 comments on commit d2c79c8

Please sign in to comment.