Performance: Controller generation
MEDIUM IMPACT
This affects the initial page load speed and server response time by controlling how much code and logic is included in the controller.
rails generate controller Posts index show
rails generate controller Posts index show new edit create update destroy
| Pattern | Code Size | Server Processing | Response Time | Verdict |
|---|---|---|---|---|
| Full scaffold controller | Large (all actions) | High (all methods loaded) | Slower (~20ms extra) | [X] Bad |
| Minimal controller generation | Small (only needed actions) | Low (less code to run) | Faster (saves ~20ms) | [OK] Good |