high compile times for every page
Answered
Alligator mississippiensis posted this in #help-forum
Alligator mississippiensisOP
whenever i click on a link to move to a new page, it takes 4-5 seconds for the new page to load.
im not sure what "relevant bit of code" or my implementation i shud show because i think im missing something very basic.
im not sure what "relevant bit of code" or my implementation i shud show because i think im missing something very basic.
Answered by B33fb0n3
then the promises takes "that long" to resolve. You can create a
Another solution would be to "resolve" those promises faster. However: I don't know how much control you have over that part of infrastructure
loading.tsx
to instantly show an UI to improve the UX. This loading.tsx
will be visible when the page is loading. After the loading is done the actual page (page.tsx
) will be visible.Another solution would be to "resolve" those promises faster. However: I don't know how much control you have over that part of infrastructure
20 Replies
@Alligator mississippiensis whenever i click on a link to move to a new page, it takes 4-5 seconds for the new page to load.
im not sure what "relevant bit of code" or my implementation i shud show because i think im missing something very basic.
try to use the
turbo
flag when developing (next dev --turbo
)@B33fb0n3 try to use the turbo flag when developing (next dev --turbo)
Alligator mississippiensisOP
i get the same issue on production tho
@Alligator mississippiensis i get the same issue on production tho
no it won't. Inside production your pages are already compiled. Also: you can't use turbo inside production
@B33fb0n3 no it won't. Inside production your pages are already compiled. Also: you can't use turbo inside production
Alligator mississippiensisOP
nono i meant
i have the same issue of high compile times for my app in production.
i read about using the turbo flag online but realised it would only reduce time during development.
why app on production has the same high compile time issue
i have the same issue of high compile times for my app in production.
i read about using the turbo flag online but realised it would only reduce time during development.
why app on production has the same high compile time issue
Alligator mississippiensisOP
i think it is vercel
one of my teammates hosts the app
ah ok. When you are in production (using
next build && next start
) then every single page is already compiled. So there must be a compile time of 0 seconds@Alligator mississippiensis nono i meant
i have the same issue of high compile times for my app in production.
i read about using the turbo flag online but realised it would only reduce time during development.
why app on production has the same high compile time issue
Alligator mississippiensisOP
maybe im using the term "compile time" incorrectly here? maybe load time is the right word?
when i click on a link, it takes 4-5 seconds for a new page to load
when i click on a link, it takes 4-5 seconds for a new page to load
@B33fb0n3 ah ok. When you are in production (using next build && next start) then every single page is already compiled. So there *must* be a compile time of 0 seconds
Alligator mississippiensisOP
yea im using the wrong terminology then
it takes 4-5 seconds for a new page to loadare there any promises on this "new" page?
Alligator mississippiensisOP
yes
@Alligator mississippiensis yea im using the wrong terminology then
ah ok, thanks for clarifing that 👍
@B33fb0n3 ah ok, thanks for clarifing that 👍
Alligator mississippiensisOP
yep mb
@Alligator mississippiensis yes
then the promises takes "that long" to resolve. You can create a
Another solution would be to "resolve" those promises faster. However: I don't know how much control you have over that part of infrastructure
loading.tsx
to instantly show an UI to improve the UX. This loading.tsx
will be visible when the page is loading. After the loading is done the actual page (page.tsx
) will be visible.Another solution would be to "resolve" those promises faster. However: I don't know how much control you have over that part of infrastructure
Answer
ok
adding the loader did it
@B33fb0n3 Thanks alot!!
happy to help