ML.
/

Writing log70 posts286 tagslatest Sep 29, 2026

Performance.

Latest posts

  1. What Does Active Record Build on Every Request? Measured the Same Way as Sequelize and GORM

    The last post concluded that Ruby is not slow and that most of a Rails request is Active Record. This one compares what Active Record does per request with Sequelize and GORM, by reading the source and measuring. Most of the cost comes from a has_and_belongs_to_many preload that turns every join row into a full record, and there is a way to cut it sharply while keeping the same SQL.

    rubyrailsactiverecord+6

  2. Where Does One Rails Request Spend Its CPU? HTTP, Routing, Database and ORM, Measured Apart

    One list request, split into four layers (HTTP server, routing and middleware, database queries, ORM) and measured in Rails, Express and Gin. 70% of a Rails request's CPU is Active Record; routing and middleware take 7%.

    rubyrailsactiverecord+5

  3. Is Rails Slow? I Built the Same Blog API Eight Times to Price the Framework

    "Rails is slow" is an unanswerable question, because a Rails app and a Go app are never doing the same work. So I narrowed it: inside one runtime, what do the framework and the ORM cost? Four runtimes, each built twice, all returning identical JSON from the identical four SQL statements, measured three times on Docker Linux with MySQL. The abstraction cost in CPU per request came out at ×7.67 for Ruby, ×6.14 for Python, ×2.62 for Node and ×2.51 for Go — and I counted, object by object, exactly what Active Record builds on every request.

    rubyrailsactiverecord+8