Slow TTFB on initial document request NextJS on Netlify

We’ve been testing out NextJS on Netlify and in doing so have noticed that the TTFB on the initial document request (not subsequent resources) is quite slow often 1.25s - 1.75s.

One site has a domain attached, while the other is using the default Netlify domain… so can rule out it being a domain thing. For those familiar with Shopify, I’ve seen this happen on their hosted theme environments when there’s a lot of server side rendering going on (excessive liquid loops)… so I’m wondering if maybe that’s somehow the case here too with NextJS? That being said, I’m seeing this on the index pages which is more-or-less all static content.

Wondering if anyone else has run into this using NextJS on Netlify. Know things are evolving rapidly here, but figure performance is why we bother with most of this, right?

Hey there, @daniel :wave:

Welcome to the Netlify Forums :netliconfetti: Sorry to be slow to respond here-- it looks like this thread has been quiet since last week. Are you still encountering this? If so, can you share your most recent build log with us?

We are experiencing a similar issue. TTFB is over 4s for SSG pages.

Is there any workaround for this?

hi there, sorry you are experiencing any slowness. Capturing a HAR file would be super helpful for us to analyze why this might be the case:

https://toolbox.googleapps.com/apps/har_analyzer/

furthermore, if this seems next related, it would be a good idea to look through any issues on this repo:

our next plugin is rapidly evolving, indeed, so sometimes going straight to github will get the attention of the next team faster!

Hey Perry,

Please see the screenshots below. It is constantly varying between 4s and 7s.

Hi there, @Veera_Health

Thanks so much for following up, I appreciate it. Can you link us to the website? Additionally, are there any known large files or images on this website?