Commit 43b055c
committed
Avoid computing expensive default values when the value is overridden anyways
The most expensive call at the moment is repo.get_changed_files, which
does down the drain if:
- another default_fn overrides the value
- an explicit override is given when creating the `Parameters`
With this change, the default function can return a function as a value,
which is not evaluated unless necessary.
Fixes #6161 parent 5fb0641 commit 43b055c
2 files changed
+9
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
267 | 272 | | |
268 | 273 | | |
269 | 274 | | |
| |||
437 | 442 | | |
438 | 443 | | |
439 | 444 | | |
440 | | - | |
| 445 | + | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
| |||
478 | 483 | | |
479 | 484 | | |
480 | 485 | | |
481 | | - | |
| 486 | + | |
0 commit comments