Open
Description
The basic idea here is to add a new --lock <PATH>
flag to pex3 lock create
and use the lock specified for pex3 lock update <PATH>
to implement faster resolves by:
- Create a venv from the existing lock that includes the configured Pip version.
- Instead of performing an isolated
pip download --log ...
, perform apip install --log
in the venv created in step 1. - Merge the changes recorded in the pip log to the original lock file.
It turns out this is a good deal faster than performing isolated pip downloads
.
The example from #2036 shows ~3x speedup with a warm re-lock today taking 22s vs a warm venv + pip install taking ~7s. This factor will likely drop closer to 2.5 once the additional overheads of processing lock diffs are added in, but it seems likely this will still net a significant win.