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 inita new blog.hexodependency toppoffice/hexo#masterinpackage.jsonnpm installgit clone https://github.com/SukkaLab/hexo-many-posts.git source/_posts/testshexo g -c <number of concurrent tasks>Testings
Environment
Test 1:
hexo clean && hexo gTest 2:
hexo clean && hexo g -c 20Test 3:
hexo clean && hexo g -c 10Test 4:
hexo clean && hexo g -c 5Pull request tasks