{"action":"created","issue":{"url":"https://api.github.com/repos/hexojs/hexo/issues/3665","repository_url":"https://api.github.com/repos/hexojs/hexo","labels_url":"https://api.github.com/repos/hexojs/hexo/issues/3665/labels{/name}","comments_url":"https://api.github.com/repos/hexojs/hexo/issues/3665/comments","events_url":"https://api.github.com/repos/hexojs/hexo/issues/3665/events","html_url":"https://github.com/hexojs/hexo/pull/3665","id":480979813,"node_id":"MDExOlB1bGxSZXF1ZXN0MzA3NTcwMTg4","number":3665,"title":"Solve \"Out of memory\" during generation by limiting the number of concurrent tasks","user":{"login":"ppoffice","id":8849362,"node_id":"MDQ6VXNlcjg4NDkzNjI=","avatar_url":"https://avatars1.githubusercontent.com/u/8849362?v=4","gravatar_id":"","url":"https://api.github.com/users/ppoffice","html_url":"https://github.com/ppoffice","followers_url":"https://api.github.com/users/ppoffice/followers","following_url":"https://api.github.com/users/ppoffice/following{/other_user}","gists_url":"https://api.github.com/users/ppoffice/gists{/gist_id}","starred_url":"https://api.github.com/users/ppoffice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppoffice/subscriptions","organizations_url":"https://api.github.com/users/ppoffice/orgs","repos_url":"https://api.github.com/users/ppoffice/repos","events_url":"https://api.github.com/users/ppoffice/events{/privacy}","received_events_url":"https://api.github.com/users/ppoffice/received_events","type":"User","site_admin":false},"labels":[{"id":296786571,"node_id":"MDU6TGFiZWwyOTY3ODY1NzE=","url":"https://api.github.com/repos/hexojs/hexo/labels/enhancement","name":"enhancement","color":"bfd4f2","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/hexojs/hexo/milestones/24","html_url":"https://github.com/hexojs/hexo/milestone/24","labels_url":"https://api.github.com/repos/hexojs/hexo/milestones/24/labels","id":4448437,"node_id":"MDk6TWlsZXN0b25lNDQ0ODQzNw==","number":24,"title":"v4.0.0","description":"","creator":{"login":"YoshinoriN","id":11273093,"node_id":"MDQ6VXNlcjExMjczMDkz","avatar_url":"https://avatars0.githubusercontent.com/u/11273093?v=4","gravatar_id":"","url":"https://api.github.com/users/YoshinoriN","html_url":"https://github.com/YoshinoriN","followers_url":"https://api.github.com/users/YoshinoriN/followers","following_url":"https://api.github.com/users/YoshinoriN/following{/other_user}","gists_url":"https://api.github.com/users/YoshinoriN/gists{/gist_id}","starred_url":"https://api.github.com/users/YoshinoriN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YoshinoriN/subscriptions","organizations_url":"https://api.github.com/users/YoshinoriN/orgs","repos_url":"https://api.github.com/users/YoshinoriN/repos","events_url":"https://api.github.com/users/YoshinoriN/events{/privacy}","received_events_url":"https://api.github.com/users/YoshinoriN/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":34,"state":"open","created_at":"2019-06-28T08:41:16Z","updated_at":"2019-09-21T05:12:56Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2019-08-15T03:37:16Z","updated_at":"2019-09-22T08:25:18Z","closed_at":"2019-08-20T15:00:21Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/hexojs/hexo/pulls/3665","html_url":"https://github.com/hexojs/hexo/pull/3665","diff_url":"https://github.com/hexojs/hexo/pull/3665.diff","patch_url":"https://github.com/hexojs/hexo/pull/3665.patch"},"body":"<!--\r\nThank you for creating a pull request to contribute to Hexo code! Before you open the request please answer the following questions to help it be more easily integrated. Please check the boxes \"[ ]\" with \"[x]\" when done too.\r\n-->\r\n\r\n## What does it do?\r\nAllow users to set the number of files to be generated in parallel.\r\nUsers who are struggling with the \"out of memory\" problem (e.g., #3350 #3311) can limit Hexo's memory usage by `hexo g --concurrency <number>`.\r\n\r\n## How to test\r\n1. `hexo init` a new blog.\r\n2. change the `hexo` dependency to `ppoffice/hexo#master` in `package.json`\r\n3. `npm install`\r\n4. Add some posts `git clone https://github.com/SukkaLab/hexo-many-posts.git source/_posts/tests `\r\n5. `hexo g -c <number of concurrent tasks>`\r\n\r\n## Testings\r\n\r\n### Environment\r\n\r\n- **hexo**: https://github.com/ppoffice/hexo#master\r\n- **theme**: landscape\r\n- **hexo-cli**: 2.0.0\r\n- **os**: Linux 5.0.0-21-generic linux x64\r\n- **node**: 12.4.0\r\n- **node_flags**: --max-old-space-size=8192\r\n\r\n\r\n### Test 1: `hexo clean && hexo g`\r\n- No concurrency limit\r\n- 659 files generated in 24 s\r\n- Memory usage: 500 ~ 660 MB\r\n![mem-graph](https://user-images.githubusercontent.com/8849362/63071183-41fa6900-beec-11e9-8499-3413a3df4f65.png)\r\n\r\n\r\n### Test 2: `hexo clean && hexo g -c 20`\r\n- 20 concurrent tasks at most\r\n- 659 files generated in 30 s\r\n- Memory usage: 450 ~ 550 MB\r\n![mem-graph](https://user-images.githubusercontent.com/8849362/63070790-9e5c8900-beea-11e9-8f7f-aa70608e38af.png)\r\n\r\n\r\n### Test 3: `hexo clean && hexo g -c 10`\r\n- 10 concurrent tasks at most\r\n- 659 files generated in 34 s\r\n- Memory usage: 480 ~ 550 MB\r\n![mem-graph](https://user-images.githubusercontent.com/8849362/63071154-17101500-beec-11e9-9feb-486a9f76411a.png)\r\n\r\n\r\n### Test 4: `hexo clean && hexo g -c 5`\r\n- 5 concurrent tasks at most\r\n- 659 files generated in 34 s\r\n- Memory usage: 420 ~ 550 MB\r\n![mem-graph](https://user-images.githubusercontent.com/8849362/63071017-6d308880-beeb-11e9-811b-347ef773be73.png)\r\n\r\n\r\n## Pull request tasks\r\n\r\n- [x] Add test cases for the changes.\r\n- [x] Passed the CI test.\r\n"},"comment":{"url":"https://api.github.com/repos/hexojs/hexo/issues/comments/533860610","html_url":"https://github.com/hexojs/hexo/pull/3665#issuecomment-533860610","issue_url":"https://api.github.com/repos/hexojs/hexo/issues/3665","id":533860610,"node_id":"MDEyOklzc3VlQ29tbWVudDUzMzg2MDYxMA==","user":{"login":"chenshiforever","id":5248630,"node_id":"MDQ6VXNlcjUyNDg2MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/5248630?v=4","gravatar_id":"","url":"https://api.github.com/users/chenshiforever","html_url":"https://github.com/chenshiforever","followers_url":"https://api.github.com/users/chenshiforever/followers","following_url":"https://api.github.com/users/chenshiforever/following{/other_user}","gists_url":"https://api.github.com/users/chenshiforever/gists{/gist_id}","starred_url":"https://api.github.com/users/chenshiforever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenshiforever/subscriptions","organizations_url":"https://api.github.com/users/chenshiforever/orgs","repos_url":"https://api.github.com/users/chenshiforever/repos","events_url":"https://api.github.com/users/chenshiforever/events{/privacy}","received_events_url":"https://api.github.com/users/chenshiforever/received_events","type":"User","site_admin":false},"created_at":"2019-09-22T08:25:18Z","updated_at":"2019-09-22T08:25:18Z","author_association":"NONE","body":"but I donn't  kown what i can do ,this step\r\n\r\n>  `2. change the hexo dependency to ppoffice/hexo#master in package.json` \r\n\r\n is not understand . i think   i have nothing to do except wait for it to update to 4.0."}}
{"actor":{"display_login":"chenshiforever"}}