The Wire · Showcase
RAILS TACKLES RACTOR SAFETY AND SCHEMA DUMP PERFORMANCE IN OVERNIGHT PUSH
By RepoJournal · Filed · About Rails
Rails is systematically freezing mutable configuration to unlock ractor concurrency, while schema dumping gets a massive speed boost that slashes database round trips by orders of magnitude on large schemas.
The core push is ractor safety. Action View subscribers are now ractor-safe by setting Rails.root at initialize time instead of lazily memoizing it [1], while separate PRs freeze Active Record and Action Pack configurations [3] and controller default_url_options [4] to make them shareable across ractor boundaries. This is foundational work for Rails 8's concurrency model. In parallel, schema dumping performance got a critical overhaul [2]. The dumper previously issued separate database statements for each table's primary key, indexes, foreign keys, and constraints, multiplying round trips by table count. On schemas with thousands of tables, that meant tens of thousands of statements the database could have answered in bulk. The readers now batch-fetch metadata for many tables at once, cutting I/O dramatically. On the community front, the Rails Foundation's On Rails podcast is now woven into rubyonrails.org itself. All 18 published episodes are backfilled as posts under a new podcast category on the news page [5], and a panel links to the podcast from the docs page alongside the Cookpad and Doximity case studies [6].
One email a day. Unsubscribe in one click.
Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Upgrade to Rails 8.1.3.1 and test your schema dump performance if you have large databases rails/rails [plan]
- → Audit any code that mutates default_url_options in controllers; freezing is now enforced rails/rails [plan]
- → Monitor ractor adoption as Rails finalizes concurrency APIs rails/rails [monitor]
References
- [1] Make Action View subscribers ractor safe ↗ rails/rails
- [2] Let the schema readers answer for many tables at once ↗ rails/rails
- [3] Freeze configuration ↗ rails/rails
- [4] Freeze the Controller `default_url_options` ↗ rails/rails
- [5] Add On Rails podcast episodes to the news page ↗ rails/website
- [6] Add On Rails podcast panel to the docs page ↗ rails/website