← Graph

Don't create controllers at Rails boot time

takeaway 1 connections

Concrete lesson from the monolith debugging: mounting business-action objects (which generated controllers) onto routes at application boot caused those controllers to be created before Spring loaded the parent process. Controllers survived all subsequent reloads, and Rails' RouteSet#clear kept running undef_method over an ever-growing population of them, creating a compounding slowdown. Fix: create controllers only after Spring has forked.

type
lesson-learned
takeaway Don't create controllers at Rails boot time
from_talk
Concrete fix identified at the end of the debugging odyssey.

Provenance

Read by
5 extractions