{"action":"created","issue":{"url":"https://api.github.com/repos/pfitzpaddy/ngm-reportDesk/issues/101","repository_url":"https://api.github.com/repos/pfitzpaddy/ngm-reportDesk","labels_url":"https://api.github.com/repos/pfitzpaddy/ngm-reportDesk/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/pfitzpaddy/ngm-reportDesk/issues/101/comments","events_url":"https://api.github.com/repos/pfitzpaddy/ngm-reportDesk/issues/101/events","html_url":"https://github.com/pfitzpaddy/ngm-reportDesk/issues/101","id":377287914,"node_id":"MDU6SXNzdWUzNzcyODc5MTQ=","number":101,"title":"Native Queries for Monthly Reports","user":{"login":"pfitzpaddy","id":1784705,"node_id":"MDQ6VXNlcjE3ODQ3MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/1784705?v=4","gravatar_id":"","url":"https://api.github.com/users/pfitzpaddy","html_url":"https://github.com/pfitzpaddy","followers_url":"https://api.github.com/users/pfitzpaddy/followers","following_url":"https://api.github.com/users/pfitzpaddy/following{/other_user}","gists_url":"https://api.github.com/users/pfitzpaddy/gists{/gist_id}","starred_url":"https://api.github.com/users/pfitzpaddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfitzpaddy/subscriptions","organizations_url":"https://api.github.com/users/pfitzpaddy/orgs","repos_url":"https://api.github.com/users/pfitzpaddy/repos","events_url":"https://api.github.com/users/pfitzpaddy/events{/privacy}","received_events_url":"https://api.github.com/users/pfitzpaddy/received_events","type":"User","site_admin":false},"labels":[{"id":811456838,"node_id":"MDU6TGFiZWw4MTE0NTY4Mzg=","url":"https://api.github.com/repos/pfitzpaddy/ngm-reportDesk/labels/discussion","name":"discussion","color":"7bd856","default":false},{"id":697574798,"node_id":"MDU6TGFiZWw2OTc1NzQ3OTg=","url":"https://api.github.com/repos/pfitzpaddy/ngm-reportDesk/labels/ngm-reportEngine","name":"ngm-reportEngine","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":{"login":"pfitzpaddy","id":1784705,"node_id":"MDQ6VXNlcjE3ODQ3MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/1784705?v=4","gravatar_id":"","url":"https://api.github.com/users/pfitzpaddy","html_url":"https://github.com/pfitzpaddy","followers_url":"https://api.github.com/users/pfitzpaddy/followers","following_url":"https://api.github.com/users/pfitzpaddy/following{/other_user}","gists_url":"https://api.github.com/users/pfitzpaddy/gists{/gist_id}","starred_url":"https://api.github.com/users/pfitzpaddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfitzpaddy/subscriptions","organizations_url":"https://api.github.com/users/pfitzpaddy/orgs","repos_url":"https://api.github.com/users/pfitzpaddy/repos","events_url":"https://api.github.com/users/pfitzpaddy/events{/privacy}","received_events_url":"https://api.github.com/users/pfitzpaddy/received_events","type":"User","site_admin":false},"assignees":[{"login":"pfitzpaddy","id":1784705,"node_id":"MDQ6VXNlcjE3ODQ3MDU=","avatar_url":"https://avatars2.githubusercontent.com/u/1784705?v=4","gravatar_id":"","url":"https://api.github.com/users/pfitzpaddy","html_url":"https://github.com/pfitzpaddy","followers_url":"https://api.github.com/users/pfitzpaddy/followers","following_url":"https://api.github.com/users/pfitzpaddy/following{/other_user}","gists_url":"https://api.github.com/users/pfitzpaddy/gists{/gist_id}","starred_url":"https://api.github.com/users/pfitzpaddy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfitzpaddy/subscriptions","organizations_url":"https://api.github.com/users/pfitzpaddy/orgs","repos_url":"https://api.github.com/users/pfitzpaddy/repos","events_url":"https://api.github.com/users/pfitzpaddy/events{/privacy}","received_events_url":"https://api.github.com/users/pfitzpaddy/received_events","type":"User","site_admin":false},{"login":"fakhrihawari","id":12655589,"node_id":"MDQ6VXNlcjEyNjU1NTg5","avatar_url":"https://avatars1.githubusercontent.com/u/12655589?v=4","gravatar_id":"","url":"https://api.github.com/users/fakhrihawari","html_url":"https://github.com/fakhrihawari","followers_url":"https://api.github.com/users/fakhrihawari/followers","following_url":"https://api.github.com/users/fakhrihawari/following{/other_user}","gists_url":"https://api.github.com/users/fakhrihawari/gists{/gist_id}","starred_url":"https://api.github.com/users/fakhrihawari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fakhrihawari/subscriptions","organizations_url":"https://api.github.com/users/fakhrihawari/orgs","repos_url":"https://api.github.com/users/fakhrihawari/repos","events_url":"https://api.github.com/users/fakhrihawari/events{/privacy}","received_events_url":"https://api.github.com/users/fakhrihawari/received_events","type":"User","site_admin":false},{"login":"drfaustusfade","id":29349472,"node_id":"MDQ6VXNlcjI5MzQ5NDcy","avatar_url":"https://avatars1.githubusercontent.com/u/29349472?v=4","gravatar_id":"","url":"https://api.github.com/users/drfaustusfade","html_url":"https://github.com/drfaustusfade","followers_url":"https://api.github.com/users/drfaustusfade/followers","following_url":"https://api.github.com/users/drfaustusfade/following{/other_user}","gists_url":"https://api.github.com/users/drfaustusfade/gists{/gist_id}","starred_url":"https://api.github.com/users/drfaustusfade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drfaustusfade/subscriptions","organizations_url":"https://api.github.com/users/drfaustusfade/orgs","repos_url":"https://api.github.com/users/drfaustusfade/repos","events_url":"https://api.github.com/users/drfaustusfade/events{/privacy}","received_events_url":"https://api.github.com/users/drfaustusfade/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-11-05T08:03:21Z","updated_at":"2018-11-05T13:34:45Z","closed_at":null,"author_association":"OWNER","body":"The increase in speed was impressive going to native queries. Its a lot of work but perhaps in the last sprint we can include an update to native queries for get/set [Monthly Reports](https://github.com/pfitzpaddy/ngm-reportEngine/blob/master/api/controllers/Cluster/Reports/ReportController.js). This is because some organisations (such as WFP Afghanistan), have a lot of locations per month and it takes an eternity to save. Same goes for native updates to [Projects](https://github.com/pfitzpaddy/ngm-reportEngine/blob/master/api/controllers/Cluster/ProjectController.js).\r\n\r\nAlong with the items we have outlined for [future sprints](https://github.com/pfitzpaddy/ngm-reportDesk/issues/98), this update could help us squeeze the max out of RH and keep us going for at least 6 months (even 2019) and buy us time to 1) build RH 2.0, 2) migrate countries to new the system."},"comment":{"url":"https://api.github.com/repos/pfitzpaddy/ngm-reportDesk/issues/comments/435875020","html_url":"https://github.com/pfitzpaddy/ngm-reportDesk/issues/101#issuecomment-435875020","issue_url":"https://api.github.com/repos/pfitzpaddy/ngm-reportDesk/issues/101","id":435875020,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTg3NTAyMA==","user":{"login":"drfaustusfade","id":29349472,"node_id":"MDQ6VXNlcjI5MzQ5NDcy","avatar_url":"https://avatars1.githubusercontent.com/u/29349472?v=4","gravatar_id":"","url":"https://api.github.com/users/drfaustusfade","html_url":"https://github.com/drfaustusfade","followers_url":"https://api.github.com/users/drfaustusfade/followers","following_url":"https://api.github.com/users/drfaustusfade/following{/other_user}","gists_url":"https://api.github.com/users/drfaustusfade/gists{/gist_id}","starred_url":"https://api.github.com/users/drfaustusfade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drfaustusfade/subscriptions","organizations_url":"https://api.github.com/users/drfaustusfade/orgs","repos_url":"https://api.github.com/users/drfaustusfade/repos","events_url":"https://api.github.com/users/drfaustusfade/events{/privacy}","received_events_url":"https://api.github.com/users/drfaustusfade/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T13:34:45Z","updated_at":"2018-11-05T13:34:45Z","author_association":"COLLABORATOR","body":"Also, there were multiple requests already regarding the issue, so it's a good idea to prioritize.\r\nIt is a classical bottleneck problem with looping updates over DB, as quite an efficient improvement, it is a comparatively easy task to parallelize not dependent on each other update queries. (e.g. using [async.each function](https://github.com/pfitzpaddy/ngm-reportEngine/blob/master/api/controllers/Cluster/ProjectController.js#L152), note: tricky part might be return values and nested parallelization), that will cut time considerably. \r\nSetting such parallelization (on local) just for each location loop cuts time for setReport at least third:\r\n![chrome_2018-11-05_18-01-22](https://user-images.githubusercontent.com/29349472/48000999-db5a4a80-e124-11e8-95ab-b7206d6141fc.png)\r\n1(edit)&2(submit) rows no async\r\n\r\n![chrome_2018-11-05_18-00-59](https://user-images.githubusercontent.com/29349472/48001003-de553b00-e124-11e8-81f9-05016b596fc9.png)\r\n3(edit)&4(submit) rows async\r\n\r\n"}}
{"actor":{"display_login":"drfaustusfade"}}