-
Notifications
You must be signed in to change notification settings - Fork 923
perf: render pages in parallel #1094
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
Hi, Ref link (about Node js parallel and concurrency) -: https://bytearcher.com/articles/parallel-vs-concurrent Just my thoughts might be completely wrong |
So I thought this won't break the CPU since it only uses the allocated amount of cores. 🥺 |
This comment was marked as outdated.
This comment was marked as outdated.
Hope it worked as expected :) |
I already approved this. Meteorlxy is in charge to merge this and publish new version. |
Sorry, Tks 💪🤝 |
The CI failed |
@meteorlxy Extremely sorry, I think it failed due to some lint issues. I used the GitHub web based editor to edit the code can you please help me to solve the issue by running a command:) Extremely sorry for the inconvenience. |
@@ -72,21 +72,20 @@ export const build = async ( | |||
const { app: vueApp, router: vueRouter } = await createVueApp() | |||
const { renderToString } = await import('vue/server-renderer') | |||
|
|||
if (spinner) spinner.text = `Starting to render pages ${chalk.magenta(app.pages?.map(vuePressPage => vuePressPage.path))}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike the idea here, I would choose to remove page path, for my theme docs around 800 pages, if would be annoying with tons of path throwing to logs without even a line break.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike the idea here, I would choose to remove page path, for my theme docs around 800 pages, if would be annoying with tons of path throwing to logs without even a line break.
if (spinner) spinner.text = `Starting to render pages ${chalk.magenta(app.pages.map(vuePressPage => vuePressPage.path)) + '\n'}`
Like this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\n
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike the idea here, I would choose to remove page path, for my theme docs around 800 pages, if would be annoying with tons of path throwing to logs without even a line break.
@Mister-Hope Sorry, is current change is ok ?
eca1040
to
a1d77c8
Compare
Let's just remove the spinner text updates for now. |
🙌💪 |
This reverts commit 78f737c.
Improving the performance by running the independent async functions in parallel✈️ .
Ref-: vuejs/vitepress#1320
Sorry if I made any mistakes :(