Closed Neo-Zhixing closed 8 months ago
Related to #2476
I'm experiencing the same problem (ref: https://github.com/misskey-dev/misskey-hub-next/issues/72). My project has 3000+ markdown documents and it takes about 30 seconds to generate each page on Cloudflare Pages.
Environment
Build Modules: -
Reproduction
To test this, download this zip file: https://neo-zhixing.github.io/vk-doc-md/dist.zip and put it in
./content/man
Then, create a new module to populate the prerendering routes
Describe the bug
Prerendering 2000+ markdown pages take 26s per page locally. On vercel this takes 10s per page
Adding 20ish longer documents and this becomes 10 minutes PER PAGE.
What does this mean? It means that your page generation is O(n) to the amount of content. Total prerender time is O(n^2) to the amount of content you have.
This makes nuxt-content unsuitable for anything non-trivial when you have more than 1000 documents.
Removing half the pages and the per-page rendering time reduce by half.
Additional context
No response
Logs
No response