Composer update memory usage: expected solver working set or leak?
0 reputation · 30 Jan 2021, 06:23 UTC
Composer update memory usage: expected solver working set or leak?
The goal is to diagnose whether elevated peak memory during Composer dependency resolution indicates a memory leak in Composer core or expected behavior from the solver, plugins, scripts, or repository metadata. No specific incident or reproducer is assumed.
High peak memory on a single large solve is not sufficient evidence of a leak. Composer 2 is generally more memory-efficient than Composer 1, but behavior depends on the installed version, lock-file state, constraint width, repository count, and active plugins. Raising COMPOSER_MEMORY_LIMIT can relieve pressure without identifying the retaining component.
An unresolved question is whether memory growth across repeated equivalent resolutions is unbounded, or whether retained allocations disappear after resolution completes. Plugin side effects, custom repositories, and warm versus cold cache states must be separated from core resolution cost before filing a defect.
Is elevated peak memory during dependency resolution a Composer core defect, and what distinguishes expected solver working set from a genuine leak?