frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Can Bundler be as fast as uv?

https://tenderlovemaking.com/2025/12/29/can-bundler-be-as-fast-as-uv/
73•ibobev•1h ago

Comments

dboreham•1h ago
I've been doing software of all kinds for a long long time. I've never, ever, been in a position where I was concerned about the speed of my package manager.

Compiler, yes. Linker, sure. Package downloader. No.

travisd•1h ago
Many of these package managers get invoked countless times per day (e.g., in CI to prepare an environment and run tests, while spinning up new dev/AI agent environments, etc).
byroot•1h ago
Ye,s but if your CI isn't terrible, you have the dependencies cached, so that subsequent runs are almost instant, and more importantly, you don't have a hard dependency on a third party service.

The reason for speeding up bundler isn't CI, it's newcomer experience. `bundle install` is the overwhelming majority of the duration of `rails new`.

maccard•53m ago
> Ye,s but if your CI isn't terrible, you have the dependencies cached, so that subsequent runs are almost instant, and more importantly, you don't have a hard dependency on a third party service.

I’d wager the majority of CI usage fits your bill of “terrible”. No provider provides OOTB caching in my experience, and I’ve worked with multiple in house providers, Jenkins, teamcity, GHA, buildkite.

byroot•22m ago
GHA with the `setup-ruby` action will cache gems.

Buildkite can be used in tons of different ways, but it's common to use it with docker and build a docker image with a layer dedicated to the gems (e.g. COPY Gemfile Gemfile.lock; RUN bundle install), effectively caching dependencies.

zingar•47m ago
Is the package manager a significant amount of time compared to setting up containers, running tests etc? (Genuine question, I’m on holiday and can’t look up real stats for myself right now)
maxbond•26m ago
Anecdotally unless I'm doing something really dumb in my Dockerfile (recently I found a recursive `chown` that was taking 20+ to finish, grr) installing dependencies is longest step of the build. It's also the most failure prone (due to transient network issues).
m00x•57m ago
When you're in a big company, the problem really starts showing. A service can have 100+ dependencies, many in private repos, and once you start adding and modifying dependencies, it has to figure out how to version it to create the lock file across all of these and it can be really slow.

Cloud dev environments can also take several minutes to set up.

maccard•49m ago
There is no situation where toolchain improvements or workflow improvements should be snuffed at.
mikepurvis•35m ago
It can be harder to justify in private tooling where you might only have a few dozen or hundred devs saving those seconds per each invocation.

But in public tooling, where the benefit is across tens of thousands or more? It's basically always worth it.

IshKebab•33m ago
Must be nice not to use Python!
skinnymuch•9m ago
I agree for my own projects where the code and libraries are not enormous. The speed and size gains aren’t going to be something that matters enough.
blibble•6m ago
try conda

took an hour to install 30 dependencies

nightpool•1h ago
Really interesting post, but this part from the beginning stuck out to me:

   Ruby Gems are tar files, and one of the files in the tar file is a YAML representation of the GemSpec. This YAML file declares all dependencies for the Gem, so RubyGems can know, without evaling anything, what dependencies it needs to install before it can install any particular Gem. Additionally, RubyGems.org provides an API for asking about dependency information, which is actually the normal way of getting dependency info (again, no eval required).
It would be interesting to compare and contrast the parsing speed for a large representative set of Python dependencies compared to a large representative set of Ruby dependencies. YAML is famously not the most efficient format to parse. We might have been better than `pip`, but I would be surprised if there isn't any room left on the table to parse dependency information in a more efficient format (JSON, protobufs, whatever).

That said, the points at the end about not needing to parse gemspecs to install "most" dependencies would make this pretty moot (if the information is already returned from the gemserver)

masklinn•47m ago
Although Yaml is a dreadful thing, given the context and the size of a normal gemspec I would be very surprised if it showed up in any significant capacity when psych should be in the low single digit MB/s throughput.
dang•1h ago
Recent and related:

How uv got so fast - https://news.ycombinator.com/item?id=46393992 - Dec 2025 (457 comments)

dbalatero•55m ago
I appreciate that Aaron is focusing on the practical algorithm/design improvements that could be made to Bundler, vs. prematurely going all in on "rewrite in Rust".
AlphaSite•18m ago
Speed would be nice, but more than that I want it to also manage Ruby installs. I’m infuriated at the mess of Rubys and version managers.
quotemstr•40m ago
Well, now my opinion of uv has been damaged. It...

> Ignoring requires-python upper bounds. When a package says it requires python<4.0, uv ignores the upper bound and only checks the lower. This reduces resolver backtracking dramatically since upper bounds are almost always wrong. Packages declare python<4.0 because they haven’t tested on Python 4, not because they’ll actually break. The constraint is defensive, not predictive

Man, it's easy to be fast when you're wrong. But of course it is fast because Rust not because it just skips the hard parts of dependency constraint solving and hopes people don't notice.

> When multiple package indexes are configured, pip checks all of them. uv picks from the first index that has the package, stopping there. This prevents dependency confusion attacks and avoids extra network requests.

Ambiguity detection is important.

> uv ignores pip’s configuration files entirely. No parsing, no environment variable lookups, no inheritance from system-wide and per-user locations.

Stuff like this sense unlikely to contribute to overall runtime, but it does decrease flexibility.

> No bytecode compilation by default. pip compiles .py files to .pyc during installation. uv skips this step, shaving time off every install.

... thus shifting the bytecode compilation burden to first startup after install. You're still paying for the bytecode compilation (and it's serialized, so you're actually spending more time), but you don't associate the time with your package manager.

I mean, sure, avoiding tons of Python subprocesses helps, but in our bold new free threaded world, we don't have to spawn so many subprocesses.

IshKebab•34m ago
> Man, it's easy to be fast when you're wrong.

There's never going to be a Python 4 so I don't think they are wrong. Even if lighting strikes thrice there's no way they could migrate people to Python 4 before uv could be updated to "fix" that.

> Ambiguity detection is important.

I'm not sure what you mean here. Pip doesn't detect any ambiguities. In fact Pip's behaviour is a gaping security hole that they've refused to fix, and as far as I know the only way to avoid it is to use `uv` (or register all of your internal company package names on PyPI which nobody wants to do).

> thus shifting the bytecode compilation burden to first startup after install

Which is a much better option.

jjgreen•29m ago
There's never going to be a Python 4

There will, but called Pyku ...

naedish•15m ago
> uv ignores pip’s configuration files entirely. No parsing, no environment variable lookups, no inheritance from system-wide and per-user locations.

Stuff like this sense unlikely to contribute to overall runtime, but it does decrease flexibility.

Astral have been very clear that they have no intention of replicating all of pip. uv pip install was a way to smooth the transition from using pip to using uv. The point of uv wasn't to rewrite pip in rust - and thankfully so. For all of the good that pip did it has shortcomings which only a new package manager turned out capable of solving.

> No bytecode compilation by default. pip compiles .py files to .pyc during installation. uv skips this step, shaving time off every install.

... thus shifting the bytecode compilation burden to first startup after install. You're still paying for the bytecode compilation (and it's serialized, so you're actually spending more time), but you don't associate the time with your package manager.

In most cases this will have no noticeable impact (so a sane default) - but when it does count you simply turn on --compile-bytecode.

pc486•9m ago
>> Ignoring requires-python upper bounds. When a package says it requires python<4.0, uv ignores the upper bound and only checks the lower. This reduces resolver backtracking dramatically since upper bounds are almost always wrong. Packages declare python<4.0 because they haven’t tested on Python 4, not because they’ll actually break. The constraint is defensive, not predictive > > Man, it's easy to be fast when you're wrong. But of course it is fast because Rust not because it just skips the hard parts of dependency constraint solving and hopes people don't notice.

Version bound checking is NP complete but becomes tractable by dropping the upper bound constraint. Russ Cox researched version selection in 2016 and described the problem in his "Version SAT" blog post (https://research.swtch.com/version-sat). This research is what informed Go's Minimal Version Selection (https://research.swtch.com/vgo-mvs) for modules.

It appears to me that uv is walking the same path. If most developers don't care about upper bounds and we can avoid expensive algorithms that may never converge, then dropping upper bound support is reasonable. And if uv becomes popular, then it'll be a sign that perhaps Python's ecosystem as a whole will drop package version upper bounds.

kimos•36m ago
I’ve been squinting at the “global cache for all bundler instances” issue[1] and I’m trying to figure out if it’s a minefield of hidden complication or if it’s actually relatively straight forward.

It’s interesting as a target because it pays off more the longer it has been implemented as it only would be shared from versions going forward.

[1] https://github.com/ruby/rubygems/issues/7249

amazingman•23m ago
If any Bundler replacement isn't using Minimal Version Selection, I'm not interested.

US to fire up small reactors in 2026 as part of 'nuclear Renaissance'

https://www.newscientist.com/article/2508802-us-to-fire-up-small-reactors-in-2026-as-part-of-nucl...
1•noleary•15s ago•0 comments

Rectal oxygenation could save your life one day

https://hackaday.com/2025/12/31/rectal-oxygenation-could-save-your-life-one-day/
1•marbartolome•56s ago•0 comments

Why Prefer Textfiles? (2010)

http://textfiles.com/uploads/textfiles.txt
1•kmstout•3m ago•0 comments

The Watcher of Westfield, New Jersey

https://en.wikipedia.org/wiki/The_Watcher_of_Westfield,_New_Jersey
1•doener•5m ago•0 comments

Brewing the perfect cup – Grinding out the maths behind coffee

https://www.ul.ie/node/11387
1•austinallegro•6m ago•0 comments

The Ridiculous Engineering of the World's Most Important Machine [video]

https://www.youtube.com/watch?v=MiUHjLxm3V0
1•choult•6m ago•0 comments

Tell HN: X/Twitter is now removing the chronological timeline

1•bratao•9m ago•0 comments

TOMLDecoder Is Now Faster Than C (Thanks to AI)

https://duan.ca/2026/01/01/TOMLDecoder-Is-Faster-Than-C/
2•DaNmarner•10m ago•0 comments

Some of your cells are not genetically yours

https://www.nature.com/articles/d41586-025-04102-4
1•jnord•12m ago•0 comments

The Angry Path to Zen: AMD Zen Microcode Tools and Insights [video]

https://media.ccc.de/v/39c3-the-angry-path-to-zen-amd-zen-microcode-tools-and-insights
2•Fnoord•12m ago•0 comments

Americans brace to start new year without healthcare

https://www.bbc.com/news/articles/c98n8lrj7y6o
3•dabinat•13m ago•1 comments

"This website is insane" (stack explained) [video]

https://www.youtube.com/watch?v=HzL65tTeANs
1•ls-a•15m ago•0 comments

Inside China's AI coders' 'village' (2 min video)

https://www.youtube.com/watch?v=ZM0um_Jk1sQ
1•rmason•19m ago•0 comments

Everything You Know About Fitness Is a Lie (2011)

https://www.mensjournal.com/health-fitness/everything-you-know-about-fitness-is-a-lie-20120504
2•dredmorbius•19m ago•2 comments

'Rock candy' technique offers simpler way to capture carbon directly from air

https://techxplore.com/news/2025-12-candy-technique-simpler-capture-carbon.html
1•PaulHoule•19m ago•0 comments

Ask HN: Who wants to be hired? (January 2026)

1•vednig•20m ago•1 comments

Show HN: A Better Kanban Tool

https://tasklanes.app
1•fcuk112•22m ago•0 comments

Show HN: Find High Quality Undervalued Stocks in Minutes

https://findgreatstocks.com/
1•finsummary•22m ago•0 comments

Lock In – A command-line task tracker that docks to the side of your screen

https://www.letslockin.xyz
1•TedOS•22m ago•1 comments

Ask HN: How do you pronounce the name of Anthropic's series of LLMs?

1•alexjplant•23m ago•0 comments

Ask HN: Who is hiring? (January 2026)

4•vednig•28m ago•0 comments

Show HN: ADSBee, an open source dual band embedded ADS-B receiver for anything

https://pantsforbirds.com/adsbee-1090/
3•CoolNamesAllTkn•29m ago•2 comments

LCP File System: Memory-Safe ZFS Alternative

https://github.com/artst3in/lcpfs
1•handfuloflight•32m ago•0 comments

Pickle 1: The first soul computer

https://pickle.com/
1•dmarcos•32m ago•0 comments

Irrational Dedication

https://fs.blog/irrational-dedication/
1•frizlab•32m ago•0 comments

Keeping Sane in the New Year

https://wordpress.jmcgowan.com/wp/keeping-sane-in-the-new-year/
1•NumberSix•33m ago•2 comments

The FBI Wants Al Surveillance Drones with Facial Recognition

https://theintercept.com/2025/11/21/fbi-ai-surveillance-drones-facial-recognition/
2•measurablefunc•33m ago•0 comments

IQuest Coder – code LLMs for software engineering and competitive programming

https://iquestlab.github.io/
1•simonpure•35m ago•0 comments

Show HN: MyStats – AI-Powered Self-Discovery with Gemini/OpenAI/Claude/Grok

https://github.com/kks0488/mystats
1•kyounsgookim•38m ago•0 comments

The High Cost of Tree Testing

https://engineering.block.xyz/blog/the-high-cost-of-free-testing
1•dosinga•39m ago•0 comments