Open sureshjoshi opened 3 months ago
Use pex's incremental lockfile updates (available, but not wired into Pants)
This is widely misunderstood. Pex does incremental updates of lock files, but it does this using a full Pip resolve which is exactly as fast as a normal lock create. This bug tracks doing an incremental resolve: https://github.com/pex-tool/pex/issues/2044 These are two orthogonal things.
Use fast-deps if we're not currently doing so
See here, but I tried this and found its still slow: https://github.com/pex-tool/pex/issues/2375#issuecomment-1960010444
This, bug tracks doing an incremental resolve: https://github.com/pex-tool/pex/issues/2044 These are two orthogonal things.
I was just writing a comment on that ticket asking whether what we have today vs what the ticket refers to were comparable. So "incremental update" vs "incremental resolve" would be a better distinction on the pex side.
See here, but I tried this and found its still slow: https://github.com/pex-tool/pex/issues/2375#issuecomment-1960010444
Ah, that sucks, but yeah - that was just an example I grabbed from one of the many slack/discussions/issues about this.
Tracker of several pending pip performance improvements: https://github.com/pypa/pip/issues/12184
Sorry, the correct tracker is now: https://github.com/pypa/pip/issues/12921
Crosslinking some other pip items of possible relevance:
It would be very helpful if you can report resolutions that are slow or problamatic on either https://github.com/notatallshaw/Pip-Resolution-Scenarios-and-Benchmarks or https://github.com/pypa/pip.
Probably you would be best switching to uv (which I do also report lots of resolution issues to), but I do aim to keep improving pip's resolver.
There is a common mention/complaint that calling
pants generate-lockfiles ::
is slow. Creating this ticket to capture associated discussions, tickets, and even better, sample repos.From my brief experiments, using pip 24.1 improves cold lockfile generation by about 50% on a small set of requirements, but does not affect incremental checking.
Some ideas that have been floated around:
uv
to some degreefast-deps
if we're not currently doing so (though, whether that will continue to be a standalone option: https://github.com/pypa/pip/pull/12208)