Re:Uv saves Home Assistant 215 compute hours per month
by serjester on Wednesday April 03, 2024 @09:23PM
(#39925518)
Being 15 years old pip is limited by backwards compatibility constraints. The biggest performance gains actually don’t come from uv being written in rust as much as reworking the dependency resolver algorithm from the ground up.
As a result the full feature set of pip isn’t supported yet, but since it’s totally interoperable with your regular venv that’s not much of an issue (you can always fall back to pip).
I’ve been playing with it for a month and I can’t imagine going back to vanilla pip.
Re:Uv saves Home Assistant 215 compute hours per month
by klysm on Wednesday April 03, 2024 @09:03PM
(#39925355)
In my experience, most performance gains I've implemented have been moving to better data structures and not iterating the same thing a bunch of times.
Re:Uv saves Home Assistant 215 compute hours per month
by qazxcvbnmlp on Wednesday April 03, 2024 @09:22PM
(#39925509)
Yup same
Re:Uv saves Home Assistant 215 compute hours per month
by AceJohnny2 on Wednesday April 03, 2024 @09:00PM
(#39925324)
Rust, the language, has rather successfully worked towards and demonstrated that, in many areas, you CAN have your pie and eat it too. But that doesn't carry over to applications, where it must be demonstrated again.
Re:Uv saves Home Assistant 215 compute hours per month
by hsbauauvhabzb on Wednesday April 03, 2024 @09:10PM
(#39925417)
I’m doubtful the fact that uv is written in rust is directly responsible for the speed increase, it’s probably just a better dependency determination algorthm.
Stop talking about fancy pies, you don’t need it even if it smells nice. What you actually need is to eat healthy and nutritious foods.
Re:Uv saves Home Assistant 215 compute hours per month
by kbenson on Wednesday April 03, 2024 @09:20PM
(#39925493)
Feels like a mixed message, because my natural inclination would be to think of Rust as healthy and nutritious foods (it takes dedication and consistency to stick with it) and a better dependency algorithm as a fancy pie, since it's a on-off nice gain that feels good, but doesn't necessarily lead to additional benefits later.
Re:Uv saves Home Assistant 215 compute hours per month
by fnordpiglet on Wednesday April 03, 2024 @10:41PM
(#39925998)
Having done a fair amount of rust porting I imagine it’s a mix a both. Rust really is remarkably faster than Python at everything. But these results are indicative of a better algorithm as well.
Re:Uv saves Home Assistant 215 compute hours per month
by vdfs on Wednesday April 03, 2024 @09:18PM
(#39925484)
While uv supports a large subset of the pip interface, it does not support the entire feature set. In some cases, those differences are intentional; in others, they're a result of uv's early stage of development.
https://github.com/astral-sh/uv/blob/main/PIP_COMPATIBILITY....
Re:Uv saves Home Assistant 215 compute hours per month
by sedatk on Wednesday April 03, 2024 @09:01PM
(#39925332)
I guess, building the tool takes longer.
Re:Uv saves Home Assistant 215 compute hours per month
by 1letterunixname on Wednesday April 03, 2024 @09:12PM
(#39925434)
Yep. Reminds me of pnpm/npm/yarn. And then of every deprecation of a core pattern with a new™ and shinier™ replacement that lacks essential functionality deemed "a useless edge-case nobody uses because analytics say so".
Is it really a drop-in replacement for pip? If it's so that's great, then why not also officially replace pip?
What are the trade-offs?