we spend ~290ms creating dataclasses during Pants ...
# development
c
we spend ~290ms creating dataclasses during Pants initialization.. if I’m reading this correctly.. 😅
👀 1
scheduler initialization is the sole largest time consumer though, on 55% 😛
looking at Pants perf data 😂
and now I see why I’ve had such a hard time grokking the startup flow in Pants.. 🤣
with so much going on 🙂
h
I can believe that. We have a lot of dataclasses. I believe Python 3.11 speeds up dataclass creation substantially
f
How soon to having scie-pants supply a 3.11 interpreter and mandate usage of scie-pants?
also useful reading is this discussion by cpython developers: https://discuss.python.org/t/improving-dataclasses-startup-performance/15442/9
e
@fast-nail-55400 no time line, but I sketched the work here: https://github.com/pantsbuild/pants/issues/18145 I'm already using the fresh cut of PBS support for 3.11 in scie-lift / science and it seems to work fine, but I'm also not linking Rust.
c
huh!? wonder what makes importing the
strawberry
lib taking so long.. that’s not something you’d want to wait for every time you invoke pants (or is this only needed when booting pantsd?)
h
Looks like the still-under-development explorer is the only thing that depends on strawberry? Which makes sense. Probably that should be in a plugin?
that's a pretty heavyweight dep to bring into core pants
c
it is in separate plugin, but perhaps it shouldn’t be enabled by default in the Pants repo.
that’s the whole point of the current use of the visibility rules in the Pants repo I’ve mentioned, to isolate these heavy explorer deps from core pants 😛
h
Oh it's fine if it's enabled by default in the Pants repo, if we have a use for it
We just shouldn't enable it by default for end users
👍 1