-
-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre rendering very slow and memory expensive #1463
Comments
opened an rfc #1482 regarding this |
Unfortunately the experimental renderer never did make it in, but if someone still needs fast prerender.js script: |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reproduction
Please try building this repo
Steps to reproduce
I am building with pre-render about 1000 pages.
Expected Behavior
I expect 1K pages rendering to take significantly less time and less memory.
Actual Behavior
When I try to build on a 2GB memory container, it fails with Out of Memory Error (Exit Status 137). It takes about 1 hr on 4GB machine with 4 vCPUs to build.
As it seems from the building process, preact build all of the files in memory first and then emits them, instead of emitting one by one and clearing the memory in process. This probably leads to such high memory usage.
On similar pre-rendering frameworks like
react-static
andGatsby
it takes about 5 min each for the same job.I love Preact but it seems I won't be able to scale the pre-rendering for my site with it.
The text was updated successfully, but these errors were encountered: