hexo-util
hexo-util copied to clipboard
feat(workerpool): bring up
The PR is a part of hexojs/hexo#4355.
Bring up a utility to manage workers and job queue.
Coverage decreased (-0.9%) to 96.058% when pulling eab4d622548453bf8c98057e97f6fa176b6571f1 on SukkaW:worker-pool into f9694976ad9642213545f42dcf4f44cae2f8efbc on hexojs:master.
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/
@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.
Any updates on this thread?
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.
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.