
6/3/2024
What this post added
Introduced experimental bytecode caching for Vercel Functions to reduce cold start latency. This involves caching the compiled JavaScript bytecode generated by the V8 engine, which is then re-used on subsequent cold starts. The implementation overcomes limitations of ephemeral file systems in serverless platforms by developing a custom solution that continuously improves the cache with traffic. Tested with Next.js applications, showing significant improvements in TTFB and billed duration. Opt-in via `USE_BYTECODE_CACHING=1` environment variable for Node.js 20 and CommonJS. Future support for ES Modules is planned.