Live data from Hacker News

Uv saves Home Assistant 215 compute hours per month

developers.home-assistant.io

21–30 of 60 posts

Re: Uv saves Home Assistant 215 compute hours per month

#21

Would the authors not have been better off adding their performance improvements to pip rather than creating their own tool? I remember this being a complaint from Node maintainers when Bun was released: they had multiple open performance-related issues with no one available to work on them.

This is definitely a paid ad. Check out the company cited in the post. It's a VC funded attempt to extend/embrace/extinguish the current tooling. [0]

https://astral.sh/about

Re: Uv saves Home Assistant 215 compute hours per month

#22
post #4

Earlier quoted context omitted.

I’m guessing “rewrite it in Rust” would have been an unpalatable PR for the pip maintainers to merge.

Yeah but I suspect there’s something more going on than Rust magic. They’re claiming a savings of about an hour and a half. (4% of the original time) That sounds like an architecture change, or more likely a whole lot of caching.

I guess the uv authors don't want to maintain a better algorithm in Python then

Re: Uv saves Home Assistant 215 compute hours per month

#23

Every time I hear "new system faster than old system!", my first thought is: what features does the new system not implement, what corner-cases does it ignore? What are the trade-offs?

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

#24

So .. like ... Why not dump python entirely if you are doing a python to rust port of a core aspect of python tool gain?

because writing python is a lot easier for most people than writing rust but changing from pip to uv is like a one liner?

Re: Uv saves Home Assistant 215 compute hours per month

#25
post #21

Would the authors not have been better off adding their performance improvements to pip rather than creating their own tool? I remember this being a complaint from Node maintainers when Bun was released: they had multiple open performance-related issues with no one available to work on them.

This is definitely a paid ad. Check out the company cited in the post. It's a VC funded attempt to extend/embrace/extinguish the current tooling. [0] https://astral.sh/about

Yes, and Linux was an attempt to extend/embrace/extinguish Unix.

Re: Uv saves Home Assistant 215 compute hours per month

#26
post #4

Earlier quoted context omitted.

I’m guessing “rewrite it in Rust” would have been an unpalatable PR for the pip maintainers to merge.

Yeah but I suspect there’s something more going on than Rust magic. They’re claiming a savings of about an hour and a half. (4% of the original time) That sounds like an architecture change, or more likely a whole lot of caching.

If the first step of your build process is creating a new pip venv from scratch, it's entirely believable to me. Pip resolves packages sequentially, so there's a lot of low hanging fruit even without yoinking a state of the art constraint solver.

As a concrete example, I have a raspberry pi 4 I use for "what's the most pathetic hardware a user might try". It takes 5-10 minutes to build up a fresh venv even when it has all of the packages cached. If I nuke the caches and make it download, it's 20+ minutes. For comparison a modern laptop takes ~1 minute.

Re: Uv saves Home Assistant 215 compute hours per month

#27

Would the authors not have been better off adding their performance improvements to pip rather than creating their own tool? I remember this being a complaint from Node maintainers when Bun was released: they had multiple open performance-related issues with no one available to work on them.

Much like how people underestimate the time and effort it takes to build mature software from scratch, people also seem to under-estimate greatly the complexity and effort involved in trying to make huge improvements to existing tools, both technical and political in nature. There's absolutely no chance that the vision the Bun folks had could be carried out in the Node.JS project in my opinion, the resulting attempt would have less impressive results and probably would leave everyone unsatisfied. One of the biggest benefits and most powerful features of open source is undoubtedly the fork, but just as important is knowing when not to do that, and that's definitely the case when the position you want to be is more different from any existing starting point than it is from scratch; I'd argue writing a 'fast' Pip-compatible package manager from first-principles is a perfect case for that.

Re: politics. Note that sometimes forks and competitors are so successful, they make it possible for the upstream to "unblock" by virtue of convincing them to adjust their vision. For Node.JS, consider io.js and Yarn in particular.

Re: Uv saves Home Assistant 215 compute hours per month

#28

Every time I hear "new system faster than old system!", my first thought is: what features does the new system not implement, what corner-cases does it ignore? What are the trade-offs?

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.

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

#30

So .. like ... Why not dump python entirely if you are doing a python to rust port of a core aspect of python tool gain?

Python from the start has always been willing to use other languages and tools if it made sense. It's a pretty common pattern (at least in the data science and research circles I've been in) to write the original in python to see if it works, and then to port it over to a lower level language (C, Rust more and more these days) and expose an interface to it in Python.

For things like dependency resolution, where you're doing a lot of heavy CPU operations, there is a lot of room for optimization in lower level languages.

Post reply on HN