Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

performance.allocation

Avoid array spread inside hot loops

Array spread or repeated concat in loops allocates per iteration and scales poorly.

#Metadata

Rule ID
ts.performance.no-array-spread-in-hot-loop
Severity
high
Confidence
0.8
Languages
javascript, typescript
Presets
recommended, strict
Stability
stable
Applies to
block
Tags
performance, rules-catalog

#Why it matters

Array spread or repeated concat in loops allocates per iteration and scales poorly.

#Remediation

Refactor this path to avoid repeated work in hot execution paths.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.performance.no-array-spread-in-hot-loop.rule.yaml.