79659529

Date: 2025-06-09 21:08:06
Score: 1.5
Natty:
Report link

I'm using Vercel Hobby plan and worried about hitting the serverless function limit. My blog uses a server component that fetches posts via getBlogPosts() based on URL params. I'm also calling it in generateMetadata, [slug] page, and for sitemap/rss.

Even though I use generateStaticParams, it feels inefficient. Any way to reduce these invocations?

My thoughts so far:

Cache getBlogPosts() and reuse it across functions

Pre-generate sitemap/rss at build time

Move filtering to client side (if post count is small)

Use revalidate: false for static builds

Would love input from others who’ve optimized for similar c

ases on Vercel.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Shudhanshu Bajpai