Next.js Discord

Discord Forum

Site Speed

Unanswered
Transvaal lion posted this in #help-forum
Open in Discord
Transvaal lionOP
A lot of users are reaching out regarding our site speed. It works fast for me but users in other regions of America are having really slow loading times. How can I debug this?

29 Replies

Transvaal lionOP
"next": "14.2.13",
Transvaal lionOP
Anyone?
Mini Rex
where is it deployed? region and deployment matters for this
Transvaal lionOP
is it iad1?
are you using caching techniques?
Transvaal lionOP
not really i dont know how
check the route at
and see which db queries that is making it slow
cache it using unstable_cache() and revalidate the data (if its updated) using revalidateTag()
@Transvaal lion is it iad1?
you can check this in the Vercel project settings
and make sure the db location is as close as possible with the vercel's region
@alfonsüs ardani you can check this in the Vercel project settings
Transvaal lionOP
It's loading all these chunk files
@Transvaal lion is it iad1?
Mini Rex
Yes, [iad1](https://vercel.com/docs/regions#:~:text=Tokyo%2C%20Japan-,iad1,Washington%2C%20D.C.%2C%20USA,-icn1) is the region. Is it closer to your customers? make sure it is.

Also, add caching, and fix routes that are slow. Simpler solution, add a loading screen for those but load the other parts of the ui faster
some time the site just wont load at all for some people
on next 14, could that be the issue?
and my local build times are so slow takes 10+ min
next 16 optimises build up to 70%
if u want to explore caching: start by checking build logs
then see what route slows you down
check such as: what db call did u have at this route? can you wrap it with unstable_cache?
@Transvaal lion Is there a debugging guide of how to implement caching? I also don't understand this loading chunks issue in the screenshot above
Mini Rex
You can skip it for now. Try to optimize your db calls for now. And test it with network throttling