-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Solve "Out of memory" during generation by limiting the number of concurrent tasks #3665
Conversation
LGTM, I don't mind Edit: |
I have reviewed and tested it myself. Thank you @ppoffice and @curbengh
mkdir concurrency-test
cd concurrency-test
hexo init
npm install 'ppoffice/hexo#master'
git clone https://github.com/SukkaLab/hexo-many-posts.git source/_posts/tests
hexo gen
hexo clean
hexo gen -c 8
hexo clean
hexo gen --concurrency 1
hexo clean
hexo gen -c 200 |
but I donn't kown what i can do ,this step |
That is using ppoffice's fork, you can use this repository instead. package.json
- "hexo": "^3.9.0",
+ "hexo": "hexojs/hexo", Modify the line with This is akin to using bleeding-edge release. |
But this approach doesn't seem to be of much use. It does add more than a hundred posts, but exceeding that number will crash, and here's my error message
|
@chenshiforever |
What does it do?
Allow users to set the number of files to be generated in parallel.
Users who are struggling with the "out of memory" problem (e.g., #3350 #3311) can limit Hexo's memory usage by
hexo g --concurrency <number>
.How to test
hexo init
a new blog.hexo
dependency toppoffice/hexo#master
inpackage.json
npm install
git clone https://github.com/SukkaLab/hexo-many-posts.git source/_posts/tests
hexo g -c <number of concurrent tasks>
Testings
Environment
Test 1:
hexo clean && hexo g
Test 2:
hexo clean && hexo g -c 20
Test 3:
hexo clean && hexo g -c 10
Test 4:
hexo clean && hexo g -c 5
Pull request tasks