https://pantsbuild.org/ logo
#general
Title
# general
b

breezy-bear-13848

05/14/2023, 2:24 PM
Hey peeps! Just curious, will pants 2.16's local Py make resolution of Python binary close to 'native' installs? I run Black on save for example, and have to maintain a dev env in parallel because waiting 2+ seconds just to start formatting is pretty awkward for on-save runs. Also had another issue but I'll post that later when I get to work.
1
h

happy-kitchen-89482

05/14/2023, 3:26 PM
Hi! Are you referring to "interpreter discovery", where Pants scans your PATH for interpreters and tests each one to find out its version? This should only happen when pantsd starts up. Are you seeing that happen on every run?
b

breezy-bear-13848

05/14/2023, 10:04 PM
I'm not sure I ever used a daemon process 🤔 But yes, that happens on each invoke. It's painful when running fmt or lint through pants — on save at least
h

happy-kitchen-89482

05/14/2023, 11:11 PM
In general Pants performance relies a lot on pantsd
so first thing is to figure out why that's not running
is it turned off in pants.toml?
And, to be sure we're on the same context, are we talking about running natively on your laptop/dev machine? And what OS/arch is that?
b

breezy-bear-13848

05/14/2023, 11:22 PM
The total run of 4 formatters on a very small file ends up spending like 5 seconds finding Python. I'll check the TOML MacOS 13.3.1/ ARM
And yes, not Dockerised or anything of the sort
So
pantsd
and
watch_filesystem
were both disabled... It completes roughly instantly now 🫠
h

happy-kitchen-89482

05/15/2023, 12:05 AM
aha!
bingo
I do sometimes think that we should (optionally) not force interpreter discovery even on pantsd restart, and instead have a manual way of nuking that info
you restart pantsd dramatically more often than you change python interpreters
3 Views