← Back to context

Comment by zahlman

3 hours ago

> That's a property of Python though. The fact that it isn't compiled (and that importing is very slow).

Bytecode compilation is compilation.

There are many things that could be used to improve import speed that I never even see discussed, let alone implemented.

But most importantly, pip doesn't need to have all these modules imported. They already proved they could defer the Requests imports; but the actual network calls aren't that hard to do with the standard library anyway. (As nice as it would be to have Requests in the standard library, but I digress.) Most of the stuff it imports up-front from Rich will go entirely unused.

> Which can easily be zero-cost in Rust.

Which is irrelevant to the point.

> This is the only example you've given that actually fits with your thesis.

No. My thesis is that pip doesn't have to be the way it is in order to actually solve the problem of installing Python packages. Everything I mentioned is an example of a thing pip doesn't have to do in order to install packages, and slows it down unnecessarily.