3e4d6b252f
When calculating the unknown values for JSON plan output, we would previously recursively call the `unknownAsBool` function on the current sub-tree twice, if any values were unknown. This was wasteful, but not noticeable for normal Terraform resource shapes. However for deeper nested object values, such as Kubernetes manifests, this was a severe performance problem, causing `terraform show -json` to take several hours to render a plan. This commit reuses the already calculated unknown value for the subtree, and adds benchmark coverage to demonstrate the improvement. |
||
---|---|---|
.. | ||
doc.go | ||
module.go | ||
plan.go | ||
plan_test.go | ||
resource.go | ||
values.go | ||
values_test.go |