Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At the point that you have large or lots of queries on the DB or something similar, you really aren't talking about Ruby performance any more, and you'd be dealing with more or less the same problem in any language.

But in my experience, here's some data from one of our most hit routes:

Basically this route will do 5 fast DB queries (load a single record by PK), a couple of Redis lookups (one of which is returning fairly large keys).

Our mean performance is 44 ms, 95th percentile is 80 ms. Almost all of that is taken up by DB / redis, actual ruby execution is not quite a rounding error, but would not be an optimization target.

The controller itself is fairly typical - 3 or 4 before actions, a decent amount of object instantiation, some branching / logic. It doesn't involve service classes and just models.

Ruby / Rails done in a fairly "vanilla" way can be pretty performant. We've had some performance issues with our app, but Ruby itself has never been the problem.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: