{"action":"created","issue":{"url":"https://api.github.com/repos/AJS-development/Ogar-unlimited/issues/1196","repository_url":"https://api.github.com/repos/AJS-development/Ogar-unlimited","labels_url":"https://api.github.com/repos/AJS-development/Ogar-unlimited/issues/1196/labels{/name}","comments_url":"https://api.github.com/repos/AJS-development/Ogar-unlimited/issues/1196/comments","events_url":"https://api.github.com/repos/AJS-development/Ogar-unlimited/issues/1196/events","html_url":"https://github.com/AJS-development/Ogar-unlimited/pull/1196","id":163519531,"number":1196,"title":"Child Processes - Reducing Lag","user":{"login":"Andrews54757","id":13282284,"avatar_url":"https://avatars.githubusercontent.com/u/13282284?v=3","gravatar_id":"","url":"https://api.github.com/users/Andrews54757","html_url":"https://github.com/Andrews54757","followers_url":"https://api.github.com/users/Andrews54757/followers","following_url":"https://api.github.com/users/Andrews54757/following{/other_user}","gists_url":"https://api.github.com/users/Andrews54757/gists{/gist_id}","starred_url":"https://api.github.com/users/Andrews54757/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andrews54757/subscriptions","organizations_url":"https://api.github.com/users/Andrews54757/orgs","repos_url":"https://api.github.com/users/Andrews54757/repos","events_url":"https://api.github.com/users/Andrews54757/events{/privacy}","received_events_url":"https://api.github.com/users/Andrews54757/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":27,"created_at":"2016-07-02T13:55:45Z","updated_at":"2016-07-12T01:06:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AJS-development/Ogar-unlimited/pulls/1196","html_url":"https://github.com/AJS-development/Ogar-unlimited/pull/1196","diff_url":"https://github.com/AJS-development/Ogar-unlimited/pull/1196.diff","patch_url":"https://github.com/AJS-development/Ogar-unlimited/pull/1196.patch"},"body":"\"NodeJS is single threaded\" is probably one of the most famous lines by nodejs programmers. But, actually, it is not 100% single threaded. There is something called ChildProccesses. I, have just learned how to use them (hours of looking at the docs and experimentation) . This allows servers using multiple cores to shine.\r\n\r\n\r\nNote that bots/minions don't apply\r\n\r\n## Advantages\r\n* Less lag (no more jerky movements,smooth );\r\n* Multi-core support\r\n\r\n## Disadvantages\r\n* You cannot run out of the src folder\r\n\r\n# TODO\r\n\r\n- [x] Make GetCellsInRange run in a child.\r\n- [ ] Make CalcViewBox run in a child.\r\n- [x] Make virus feed run in a child\r\n- [x]  Make updatenodes run in a child\r\n- [x]  View box update now depends on client lag.\r\n- [x]  Fix chat commands"},"comment":{"url":"https://api.github.com/repos/AJS-development/Ogar-unlimited/issues/comments/231910325","html_url":"https://github.com/AJS-development/Ogar-unlimited/pull/1196#issuecomment-231910325","issue_url":"https://api.github.com/repos/AJS-development/Ogar-unlimited/issues/1196","id":231910325,"user":{"login":"Agarian","id":15255724,"avatar_url":"https://avatars.githubusercontent.com/u/15255724?v=3","gravatar_id":"","url":"https://api.github.com/users/Agarian","html_url":"https://github.com/Agarian","followers_url":"https://api.github.com/users/Agarian/followers","following_url":"https://api.github.com/users/Agarian/following{/other_user}","gists_url":"https://api.github.com/users/Agarian/gists{/gist_id}","starred_url":"https://api.github.com/users/Agarian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Agarian/subscriptions","organizations_url":"https://api.github.com/users/Agarian/orgs","repos_url":"https://api.github.com/users/Agarian/repos","events_url":"https://api.github.com/users/Agarian/events{/privacy}","received_events_url":"https://api.github.com/users/Agarian/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T01:06:32Z","updated_at":"2016-07-12T01:06:32Z","body":"Why?"}}
{"actor":{"display_login":"Agarian"}}