Next.js Discord

Discord Forum

First load of page is slow due to LoadComponents.loadComponents

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
I have an app deployed to GCP where I noticed that sometimes pages are very slow to render (I'm not sure whether it's just this specific page or the first page loaded on a new instance). As you can see, it spends almost no time in my code (tens of ms) but over a minute waiting for LoadComponents.loadComponents.

Have you seen this before? How can I speed it up? Is there a way to do this before serving the first request? Maybe lazy loading will help?

1 Reply

Sloth bearOP
After adding lazy loading. I'm a little suspicious because it seems like there should be more info in this trace but maybe this is the answer.