Next.js Discord

Discord Forum

Debugging slow pages/components (in dev mode)

Unanswered
Tonkinese posted this in #help-forum
Open in Discord
TonkineseOP
I have a page/component that takes a very long time to reflect changes when i do them in dev mode, but only happens in dev mode (i.e. not in prod)

how do i debug what's causing this massive lag?

I'm on an M3 mac, using next 15, turbopack

8 Replies

Brown bear
You can use react's profiler to see how long each component takes to render. My guess is that you have some blocking server components that don't cause issues in prod because they're either cached or statically served
you install the extension, press record, refresh the page, stop the recording
and you should see a graph that shows you the render time of each component
TonkineseOP
aight thanks