I have all the code related to data fetching using firebase in getServerSideProps. Read the docs to write server side code in getServerSideProps directly.
After deploying it to vercel, I have noticed the first request is about 8-10 seconds. Which is very slow. Next requests are quick and less than 1 second. Someone said its an issue with cold starts. How do I speed this up?
Possible solutions I am thinking is use a auto-pinger or something like that keeps hitting the site's webpage every few seconds. But for a large app, its not ideal to ping all other pages.
Is there anyway I can speed this process up, so that no matter when I visit the site its fast and there is a quick response.