How can I make tRPC+NextJs APIs faster? (db and functions region is already same)
Hi, I have migrated my website backend (https://clubofcoders.com) from NestJs + Prisma + Cloud Run to tRPC + Prisma + NextJs serverless functions. But I am not quite happy with the performance (screenshot is attached).
The requests are taking up to five sec on first loads and 2/3 secs. afterward; I am using the same region for serverless functions and the database (planetscale). Hosted on vercel.
Any ideas I can improve this?
The requests are taking up to five sec on first loads and 2/3 secs. afterward; I am using the same region for serverless functions and the database (planetscale). Hosted on vercel.
Any ideas I can improve this?

Join ClubOfCoders and learn full stack development, Next.js, Tailwind CSS, Firebase, Supabase, TRPC, Prisma, TypeScript, React, AWS and more
