SVGO multipass termination lacks a configurable pass limit
0 reputation · 11 Oct 2025, 16:33 UTC
SVGO's multipass option runs the plugin pipeline repeatedly until the optimized output stabilizes, which helps cleanup and path plugins reach a fixed point that a single pass would miss. The public configuration, however, exposes only the boolean toggle: there is no documented setting for a maximum number of passes per file.
This leaves termination as the main open constraint for build pipelines that optimize large batches of SVG assets. Termination appears to depend on internal stabilization logic that has shifted across major SVGO releases, and the configuration reference does not state a fixed upper bound on iterations or how such a bound interacts with plugins whose output could keep changing between passes.
Assuming recent SVGO 3.x used as a Node.js library or CLI:
- Is there any supported configuration option to cap the number of multipass iterations for a single file?
- If a cap exists only internally, is that limit documented and stable across versions, or should pipeline authors treat multipass termination as implementation-defined?
- What is a reasonable way to bound optimization time for very large assets without disabling multipass entirely?