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

feat(workerpool): bring up #212

Closed
wants to merge 4 commits into from
Closed

Conversation

SukkaW
Copy link
Member

@SukkaW SukkaW commented Jun 12, 2020

The PR is a part of hexojs/hexo#4355.

Bring up a utility to manage workers and job queue.

@SukkaW SukkaW requested review from segayuu, curbengh and a team June 12, 2020 06:10
@coveralls
Copy link

coveralls commented Jun 12, 2020

Coverage Status

Coverage decreased (-0.9%) to 96.058% when pulling eab4d62 on SukkaW:worker-pool into f969497 on hexojs:master.

@SukkaW
Copy link
Member Author

SukkaW commented Jun 20, 2020

Minimum required Node.js version has bumped to 12.13, which is the first LTS version of Node.js 12: https://nodejs.org/en/blog/release/v12.13.0/

Copy link
Contributor

@curbengh curbengh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mergeable after removing unneeded eslint-disable-line.

@@ -0,0 +1,23 @@
'use strict';

// eslint-disable-next-line node/no-unsupported-features/node-builtins
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required after https://github.com/hexojs/hexo-util/pull/212/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R57
comment in other files can be removed too.

@SukkaW
Copy link
Member Author

SukkaW commented Jul 23, 2020

@curbengh We might not bring up Worker Threads during Hexo 5.0.0 development. So we can leave this PR here until we officially drop Node.js 12.

@stevenjoezhang
Copy link
Member

Any updates on this thread?

@SukkaW
Copy link
Member Author

SukkaW commented Nov 25, 2022

After some benchmarking, multi-thread could actually hurt the performance for most of the hexo site, as serializing objects between the main thread and the worker thread would introduce too much overhead.

@SukkaW
Copy link
Member Author

SukkaW commented Apr 24, 2024

There are already many worker pool implementations out there that are better than my home-baked one. Even if Hexo is going to adapt multi-thread, we will use those libraries instead.

@SukkaW SukkaW closed this Apr 24, 2024
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

Successfully merging this pull request may close these issues.

4 participants