Closed warflash closed 9 months ago
Hello,
47mb is huge. what is the content of this file?
As far as I can tell it contains the parsed AST of all files in the /content dir. Our content directory hold about 26mb of content which when built turns into ~46mb of AST cache. This is the cache file of the starter template after building the project, adding more content will make that grow: cache.1699359927415.json
I general I feel like it might not be the best solution performance wise to load and parse such a huge json object on every content requests. On my local machine reading and parsing our cache file takes ~400ms alone so a single lamdba might struggle even more when loading that
Yes, I see. this endpoint is only used by the clientDb. maybe it could be disabled using an option (not implemented)? (but this could impact nuxt studio, don't know more about this)
Interesting.. Yeah I guess if it's really not needed then an option to disable generation might be handy indeed. According to the logs it takes about 80s to generate the cache file for us as well so that'd be quite the savings in the CI itself. There is content.experimental.clientdb
but that doesn't seem to do the trick
For now, you can set experimental.cacheContents
to false in order to disable this chunk.
The fix is released in edge-channel, You can try it in edge version.
Environment
Build Modules: -
Reproduction
-
Describe the bug
Cloudflare pages and I assume other edge products based on cf workers and KV are limited to 25mb in single file size. The cache fill nuxt content generates may easily surpass that. ->
Additional context
No response
Logs