thinking aloud, I wonder if `pants_loader` and `pa...
# development
h
thinking aloud, I wonder if
pants_loader
and
pants_exe
need to be separate files
if we were going to replace the first chunk of pants initialization code with a rust program, I would think that
pants_loader
,
pants_exe
, and possibly
pants_runner
are what it would replace
👍 1
w
the loader is used to load either the daemon or pants itself, iirc.
because two entrypoints.
but possibly.
h
I'm also wondering if the
pants
binary itslef needs to be a shell script
w
would want to figure out how the binary is distributed before thinking about that, probably.
h
anyway @witty-crayon-22786 it's hard to run py-spy on pants because
pants
is a shells script. although I guess I could just modify it to include
py-spy
in what it invokes
w
The pid
See the example command I pasted
h
I don't think that helps me profile the very beginning of a pants run, before pantsd is running
w
true. but that's not the portion that is relevant in the context of "how fast is pantsd"
would recommend something like
Copy code
sudo echo
sudo py-spy record -p $pantsdpid --output x.svg & ./pants $goaltotest kill-pantsd
basically, warm up
sudo
then spawn py-spy in parallel with starting the goal you want to test
then kill-pantsd, which will cause the py-spy recording to complete
h
why sudo?
w
because py-spy (used to?) require it
h
in this case I think I do want to profile what's happening before pants talks to a running pantsd instance
👍 1
if that's where 1-2 sec of latency is
👍 1
anyway it looks like I can do this by replacing a line in the
pants
shell script
and it doesn't seem to require sudo
w
if that's where 1-2 sec of latency is
sure. but we already know how to fix that part.
h
that's the stuff you said pierre knows about, right?
or had thought about?
w
the whole client should be replaced with a rust or c binary
👍 1
h
I think that's actually teh thing that toolchain cares about right now
👍 1
it's what I expect to be working on for the next while, anyway
❤️ 1
w
yea, it's big. as mentioned earlier in here, the server portion is more unknown.
h
so I want to make sure that I can see that replacing that bit of code with rust is actually a win
I believe there's latency that can be fixed in the server too, but I think for now we'd be happy if connecting to a warm pantsd was quick
❤️ 1
and the fix for that will also make every pants run, pantsd or no, 1-2 sec quicker
w
Screen Shot 2020-03-18 at 7.46.06 PM.png
@hundreds-breakfast-49010: you don't need to profile to see that the client is bad. can just look at the server log
and see that it takes 1.5-2 seconds between starting a command and the first logging in the server
(
.pants.d/pantsd/pantsd.log
)