by ciconia · 1y ago · 0 comments
But in my experience it does. I've built platforms in Ruby that handle north of 1K reqs/sec with bursts of 10K reqs/sec on moderate hardware, without needing to setup a whole cluster of machines that crunch on poorly-performing code.
From my experience, getting the average execution time per render from say 0.1ms to 0.01ms, and especially reducing allocations and GC pressure has a big effect on 99% percentiles, and consequently on the cost of compute.
Saying because we use Ruby we don't care if it's slow or not is in a way dismissing it as a viable platform for writing reliable software (because performance is part of reliability).
To me, you can use Ruby to create systems that have very good performance characteristics, and still benefit from developer happiness. The two are not contradictory.
Not OP, but to a point I think this is pretty much true...
We currently have decent performance so it works out well for most use cases, but if Ruby were to be slower, we could probably cover that issue with infra, caching or other means. As we already do in many cases.
It would be a pain point, but in comparison increasing developer happiness or the whole product dev experience is IMHO a lot harder. Perfs would need to be abysmally bad to change that balance.
Parralelize the build, buy more resource for the CI. It might cost more but it will be "saving lifes" after all, right ?
The question is usually whether those scripts would have existed if it wasn't for Python. I assume if it was trivial to rewrite them you'd do it in 2 hours and go on with your life.
The tools possibly wouldn’t exist, but there are options now that provide better ergonomics and are not slow.
Jean Boussier wrote this execellent examination of CPU bound Rails application and why making use of multi-processes is probably a good idea.
Even if you're not using CPU bound it's still daft to leave performance on the table you don't need to.
For the most part if something is a bit slower than it needs to be it still makes more sense to take the obvious bottle necks out before you rewrite the whole system in another language. Especially with YJIT and forcoming ZJIT availible.
1. https://byroot.github.io/ruby/performance/2025/01/23/the-myt...
I would add to this commentary that there are a number of things you can do in Rails to speed it up. For instance, ActionController::Metal