Is there way to improve runtime of `pants generate...
# general
f
Is there way to improve runtime of
pants generate-lockfiles
? I ran it after adding a new 3rd party to our company's repo and it is now taking forever. I'm new to pants so I'm not sure if it's normal or not (And I believe this should not be normal behavior). Or is there any common mistakes that can result in long lock file generation?
👀 1
f
I have a requirements file that takes about 5 minutes to resolve. But when I introduce a conflict it can take forever (literally, I don’t know how long, >1h I think) … the solution I’ve found is to now first run
uv pip compile
to check if the requirements are resolvable and iterate with that … then, once I know it’s solvable, I run
pants generate-lockfiles
. Not sure this helps in your case but works well for me.
👀 1
Just to be clear: I don’t make
pants generate-lockfiles
faster in the good case but I avoid running it on the bad case (which can take way longer).
👍 1
f
Thank you. Actually the slowness is not fixed, but I also had a generation failure .. which is fixed by applying
uv pip compile
result