Next.js Discord

Discord Forum

hi, what does the seconds inside the brackets mean? why some of the pages have it and some dont?

Unanswered
Indian oil sardine posted this in #help-forum
Open in Discord
Indian oil sardineOP
hi, what does the seconds inside the brackets mean? why some of the pages have it and some dont? I tried using dynamic for all the components I created, but the load speed is still not improving

13 Replies

your /contacts took 3.2s to generate during the build time
Indian oil sardineOP
I see, thanks for the respond
but why some pages have the brackets and some and dont?
is it only pages that have long loading time shows the bracket?
if you meant the square brackets [] then those pages are just dynamic routes
Indian oil sardineOP
sorry, I mean the parentheses
/contacts/[contact_id] (853ms) means:
* /contacts/[contact_id]/page.tsx is being built
* that build takes 853ms
@Indian oil sardine is it only pages that have long loading time shows the bracket?
yes only pages with expectedly slow generation time display that
generally it's not a problem since it only impacts the build time
runtime users are not impacted
Indian oil sardineOP
I see, from the numbers shown in the screenshot, are the size of the pages ok? when I run npm run dev in localhost:3000 while navigating between some pages, it is slow, but when I did npm run build and npm run start or next start the navigation of the pages loads instantly
@Indian oil sardine I see, from the numbers shown in the screenshot, are the size of the pages `ok`? when I run `npm run dev` in `localhost:3000` while navigating between some pages, it is slow, but when I did `npm run build` and `npm run start` or `next start` the navigation of the pages loads instantly
they are red so they are not "fully ok", but imo 200kB is fine enough. you should still reduce it if you can, but if you can't then 200kB is not the end of the world.

npm run dev is expected to be slow, because (1) the pages aren't optimised and (2) all pages are built on-demand

npm run start is much faster because (1) everything is optimised and (2) all pages are built at build time, ready to serve. you should always run npm run start for applications facing the user. only use npm run dev when you develop the web app