Skip to main content

How uv saves Home Assistant 215 compute hours per month

· 2 min read

By replacing pip with uv in our production images, our build pipeline (and therefore releasing a new version) is a lot faster. Uv is an extremely fast Python package installer and resolver written in Rust. It is developed by Astral and it's open source. Check it out on GitHub.

In the following table, you can see that we can save around 5 hours of execution time on each build.

ArchPipUVSavings
aarch641h 24m 53s5m 18s~1h 20m
armhf1h 52m 20s6m 2s~1h 46m
armv71h 26m 43s5m 28s~1h 21m
amd6422m 10s3m 20s~19m
i38617m 37s3m 11s~14m

On average, we run the build pipeline 43 times as we create

  • 31 nightlies (one nightly per day)
  • 7 beta releases
  • 5 stable releases (including patch ones)

In total, we save around 215 hours per month. With this massive improvement, we can now ship hotfixes even faster, as the pipeline to ship a new version now takes around 20 minutes instead of 2.5 hours.

The 215 monthly saved execution hours can be used by other jobs and make the CI experience for all developers and our community better. By replacing pip with uv, we improve our sustainability by using fewer resources to build our images.

A big thank you to Astral for developing this amazing tool. Please check out their website and products as they offer, for example, a "lightning" fast linter/formatter for Python too.