DEV Community

Diagnosing a slow Rails page, layer by layer (opens in new tab)

Discussed on DEV

"This page feels slow" is a vague bug report. Before changing any code, it helps to have a fixed way to locate where the time goes. A Rails request passes through a few predictable layers, and each layer has its own tools and its own typical failure mode. Here is the mental model I use, and a real example of walking it end to end. The layers of a request Middleware → Controller → SQL → View → external calls → browser Most slowness lives in one of these: Layer Typical problem How it shows up C...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help