Estimate template rendering time for a Helm chart based on template count and complexity.
Before Helm ever talks to the Kubernetes API, it renders every template file client-side using Go's text/template engine, evaluating `.Values`, `range` loops, `include`/`tpl` calls, and named templates. Total render time scales with the number of template files and how computationally heavy each one is — charts that loop over large lists or call `include` recursively across many subcharts render noticeably slower than simple, flat charts.
renderTime = templates × avgTemplateComplexity
Nested `range` loops over large value lists, repeated `include`/`tpl` calls (especially recursive named templates), heavy use of the `lookup` function which hits the API server, and large inline scripts or config blocks re-evaluated per iteration.
Yes — `--dry-run` and `helm template` both perform the full client-side render without applying to the cluster, so they're a good way to isolate and benchmark render time separately from apply/hook time.
Avoid unnecessary `lookup` calls, cache repeated `include` results in variables with `$_ := ...`, flatten deeply nested subchart hierarchies, and split monolithic charts with dozens of templates into smaller, focused ones.