Skip to content
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

Request/Question: Can you render multiple pages at a time? #9

Open
mansona opened this issue Jan 20, 2018 · 8 comments
Open

Request/Question: Can you render multiple pages at a time? #9

mansona opened this issue Jan 20, 2018 · 8 comments

Comments

@mansona
Copy link
Collaborator

mansona commented Jan 20, 2018

I haven't looked into this in any great detail but I'm currently pre-rendering roughly 2K pages in an ember app (each version of the ember guides) and it takes a long time.

I wonder if it were possible to speed up the process to "batch request" 10 or 20 pages at a time?

@ef4
Copy link
Owner

ef4 commented Jan 20, 2018 via email

@mansona
Copy link
Collaborator Author

mansona commented Jan 21, 2018

I will take a look when (if?) this becomes an issue for us during deployment 👍

@midhunpm
Copy link

@ef4 - I am also trying to do the same thing. I am fairly new to Ember. Would you please explain what do you mean by "fork multiple worker processes"? Or any references to the explanation will also be helpful.
Thank you!

@mansona
Copy link
Collaborator Author

mansona commented Nov 29, 2018

@midhunpm how many pages are you looking to prerender?

This isn't really an "Ember" thing per say 😂 it's more of a NodeJS thing. Essentially the original issue was related to "batching" the prerender process: https://github.com/ef4/prember/blob/master/lib/prerender.js#L122 to speed it up.

We eneded up not going down this line for the Ember Guides because we're rendering roughly 3K pages in about 10 mins every time we deploy https://travis-ci.org/ember-learn/guides-app/builds/461084204 and we figured that was "good enough" for our use cases 👍

@ef4
Copy link
Owner

ef4 commented Nov 29, 2018

Node has experimental worker thread support now.

@midhunpm
Copy link

@mansona - I am trying to pre-render around 1400 pages. There is not much of dynamic content on these pages and it servers mostly like a brochure page to our application. And above all that to leverage SEO benefit we decided to pre-render these pages and serve them as static html files. I hope this is a good idea!

@mansona
Copy link
Collaborator Author

mansona commented Nov 29, 2018

@midhunpm how often do you pre-render it? like I said we are getting a 10 mins build for double the number of pages and that suits our needs for now 👍

@midhunpm
Copy link

midhunpm commented Dec 1, 2018

@mansona - The application is not production ready yet but we are thinking about running build every night to pre-render the pages as we might have changes in the content that we display in the pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants