hundreds-lion-13128
06/16/2025, 7:04 AMgenerate-lockfiles
twice in row, it still takes 5-10mins and the logs imply that archives are redownloaded and packages recompiled.
Shouldn't there be a cache present to avoid this?curved-manchester-66006
06/16/2025, 4:30 PMpip
cache (used under the hood) should be preserved as a named cache. But much like doing pip install --dry-run
twice, little to none of the resolution is cachedhappy-kitchen-89482
06/17/2025, 4:21 AMhappy-kitchen-89482
06/17/2025, 4:23 AMhappy-kitchen-89482
06/17/2025, 4:23 AMhundreds-lion-13128
06/17/2025, 12:15 PMhundreds-lion-13128
06/17/2025, 12:15 PMcurved-manchester-66006
06/17/2025, 4:40 PMAnd the resolve is 'slow' because of all the index lookups it needs to do, right?Well dependency resolution is NP-Complete so the answers for why things are slow dependent to be complex and hinge on the interaction of various heuristics. And the implementation details matter very much in practice. To your original point. Are you seeing
generate-lockfiles
behave slower/differently than pip
?
https://github.com/pantsbuild/pants/issues/21223 also cross links a bunch of breadcrumbshundreds-lion-13128
06/18/2025, 2:14 PMuv pip compile
resolves the packages in 5-15 seconds.curved-manchester-66006
06/18/2025, 2:26 PMuv
uses a different logarithm implemented in a different language and is generally much faster than pip
hundreds-lion-13128
06/19/2025, 6:57 AMuv pip compile
to resolve, then feed that into the lockfile generation via constraints.txt)