After sitting idle, window takes a few seconds to update.
Unanswered
Rhinelander posted this in #help-forum
RhinelanderOP
When I leave a Vercel hosted Next.js tab idle for a minute or two, when I go to click on something, it takes like 1-3s before anything happens. Is there something I should be doing to make it stay fast? Is that just how Vercel hosting is?
40 Replies
@Rhinelander When I leave a Vercel hosted Next.js tab idle for a minute or two, when I go to click on something, it takes like 1-3s before anything happens. Is there something I should be doing to make it stay fast? Is that just how Vercel hosting is?
sounds like cold boot time for serverless... you can make it better by using edge i think
@riský sounds like cold boot time for serverless... you can make it better by using edge i think
RhinelanderOP
how would I do that? Is it as simple as enabling it in settings or would it require a restructure of my program?
@Rhinelander how would I do that? Is it as simple as enabling it in settings or would it require a restructure of my program?
To use the edge you need to have edge supported infrastructure in the Database if you're using one.
You can implement the edge easily, follow this doc
https://nextjs.org/docs/app/api-reference/edge
You can implement the edge easily, follow this doc
https://nextjs.org/docs/app/api-reference/edge
@Param san To use the edge you need to have edge supported infrastructure in the Database if you're using one.
You can implement the edge easily, follow this doc
https://nextjs.org/docs/app/api-reference/edge
RhinelanderOP
By database do you mean my literal mysql database, or are you referring to something different?
Is it on AWS or GCP or somewhere else?
RhinelanderOP
I am not actively using a database
I have support for it incase I decide to integrate it later down the road
but not currently, which will make things easier right?
It depends on every case.
So your data is static?
RhinelanderOP
yes
the entire site is SSR
Wait then how is your site static man?
RhinelanderOP
wait what do you mean by static
I am relatively new to Next.js
Data doesn't change
RhinelanderOP
yeah
SSR means data keeps changing
RhinelanderOP
I meant Server Side Rendered
wait is that not what I think it is
isnt it where the server renders it cause it doesnt differ between users
And your problem is not related to any of this. You might have some kind of other library which might be causing this.
@Rhinelander isnt it where the server renders it cause it doesnt differ between users
You are using Nextjs App router?
RhinelanderOP
pages currently
I havent taken the time to switch yet
You should, app router is much clear and flexible for developer experiences
Can I see your website's live version?
Live*
@riský sounds like cold boot time for serverless... you can make it better by using edge i think
He is not using any database.
@Param san He is not using any database.
Database has nothing to do with serverless coldboot
@riský Database has nothing to do with serverless coldboot
Are you talking about the coldboots of Vercel servers?
Yes
I guess it might be because of the ads he's showing.
@Param san I guess it might be because of the ads he's showing.
RhinelanderOP
this has been an issue far before that
(I removed the ads, same problem)
I have never encountered this kind of problem in Nextjs since I started using it before 1 and half year.
RhinelanderOP
I am not sure how to do that, but I will look into it 🙂