nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.13k stars 627 forks source link

perf(content-list): cache contents list during generation and per-request #2527

Closed farnabaz closed 9 months ago

farnabaz commented 9 months ago

🔗 Linked issue

resolves #2449

❓ Type of change

📚 Description

The bottleneck in the pre-rendering phase is getting contents list from file system. By caching the list in the pre-render process, the generation time will drop significantly.

This change reduce the generation time in Content docs from 15s to 5s on my machine

📝 Checklist

cloudflare-workers-and-pages[bot] commented 9 months ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 732edc1
Status: ✅  Deploy successful!
Preview URL: https://77e5d7bd.nuxt-content-1il.pages.dev
Branch Preview URL: https://perf-cache-contents-list.nuxt-content-1il.pages.dev

View logs

manlm commented 9 months ago

may i ask when will this be released

atinux commented 9 months ago

@manlm you can use the edge channel to use it today: https://content.nuxt.com/get-started/edge-channel

Release should be next week