public note-to-self: an important part of the spee...
# development
w
public note-to-self: an important part of the speedups that should be possible with PEX native lockfiles is skipping the building of the “repository pex”
--pex-repository
, and directly consuming the lockfile to build each subset of the resolve. i haven’t followed up on this because there is a lot in flight, but doing that is likely something that would be worth getting into 2.11.x as a key benefit to the switch
👍 2
(as long as it isn’t risky? but i don’t see why it would be, relative to any other consumption of the lockfile)
b
I'm interested in taking a look at this. If you have any breadcrumbs, please leave them 🤓
w
@hundreds-father-404: i know you’re recovering (hope you feel better), but when you’re up to explaining this one that would be great
h
this would be great to implement. I have lots of doctors appointments / therapy still the next two weeks, so indeed your help @bitter-ability-32190 would be really helpful I think the main trick is
pex_from_targets.py
. That's where all the repository pex shenanigans happen.
pex.py
is too general for that. My advice is to temporarily assume that all lockfiles are Pex format - how would we implement this? Now, still assume Pex format, but consider
[python].use_entire_lockfile
or whatever it is. Finally, consider requirements.txt-style lockfiles which need to still do the repository Pex thing. It's gonna be pretty ugly code to figure this out, but I think worth it!
👍 1
b
Little PoC showing us sidestepping all non-veng pexs for deps https://github.com/thejcannon/pants/tree/lockspeedy
From cold cache, this takes
./pants lint ::
on
2.11
from
12m31.230s
to
5m8.468s
...and now we can incrementally lint a single file without paying the 10 minute penalty of a full repo PEX. This is glorious.
1
If @hundreds-father-404 and/or @witty-crayon-22786 take a quick look and confirm this the direction we want to head (stop using pex_path and put all deps hard/softlinked into final venv) I can round the PR out and make it nice, I'd very much like to have this in 2.11.x to roll out in an RC I can switch to in our repo, It'll be a huge win simple smile
WIP PR exists now, with metrics: https://github.com/pantsbuild/pants/pull/14923
w
exciting! will definitely look this afternoon.
🙌 1
finally got around to it. thanks!
b
New pr being posted soon
w
awesome! thanks.