{"action":"created","issue":{"url":"https://api.github.com/repos/SharePoint/PnP-Sites-Core/issues/1820","repository_url":"https://api.github.com/repos/SharePoint/PnP-Sites-Core","labels_url":"https://api.github.com/repos/SharePoint/PnP-Sites-Core/issues/1820/labels{/name}","comments_url":"https://api.github.com/repos/SharePoint/PnP-Sites-Core/issues/1820/comments","events_url":"https://api.github.com/repos/SharePoint/PnP-Sites-Core/issues/1820/events","html_url":"https://github.com/SharePoint/PnP-Sites-Core/pull/1820","id":332221298,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NzU3ODUx","number":1820,"title":"bugfix: removing unecessary task.run for the synchronous methods","user":{"login":"baywet","id":7905502,"node_id":"MDQ6VXNlcjc5MDU1MDI=","avatar_url":"https://avatars1.githubusercontent.com/u/7905502?v=4","gravatar_id":"","url":"https://api.github.com/users/baywet","html_url":"https://github.com/baywet","followers_url":"https://api.github.com/users/baywet/followers","following_url":"https://api.github.com/users/baywet/following{/other_user}","gists_url":"https://api.github.com/users/baywet/gists{/gist_id}","starred_url":"https://api.github.com/users/baywet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baywet/subscriptions","organizations_url":"https://api.github.com/users/baywet/orgs","repos_url":"https://api.github.com/users/baywet/repos","events_url":"https://api.github.com/users/baywet/events{/privacy}","received_events_url":"https://api.github.com/users/baywet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"jansenbe","id":7451219,"node_id":"MDQ6VXNlcjc0NTEyMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/7451219?v=4","gravatar_id":"","url":"https://api.github.com/users/jansenbe","html_url":"https://github.com/jansenbe","followers_url":"https://api.github.com/users/jansenbe/followers","following_url":"https://api.github.com/users/jansenbe/following{/other_user}","gists_url":"https://api.github.com/users/jansenbe/gists{/gist_id}","starred_url":"https://api.github.com/users/jansenbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jansenbe/subscriptions","organizations_url":"https://api.github.com/users/jansenbe/orgs","repos_url":"https://api.github.com/users/jansenbe/repos","events_url":"https://api.github.com/users/jansenbe/events{/privacy}","received_events_url":"https://api.github.com/users/jansenbe/received_events","type":"User","site_admin":false},"assignees":[{"login":"jansenbe","id":7451219,"node_id":"MDQ6VXNlcjc0NTEyMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/7451219?v=4","gravatar_id":"","url":"https://api.github.com/users/jansenbe","html_url":"https://github.com/jansenbe","followers_url":"https://api.github.com/users/jansenbe/followers","following_url":"https://api.github.com/users/jansenbe/following{/other_user}","gists_url":"https://api.github.com/users/jansenbe/gists{/gist_id}","starred_url":"https://api.github.com/users/jansenbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jansenbe/subscriptions","organizations_url":"https://api.github.com/users/jansenbe/orgs","repos_url":"https://api.github.com/users/jansenbe/repos","events_url":"https://api.github.com/users/jansenbe/events{/privacy}","received_events_url":"https://api.github.com/users/jansenbe/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-06-14T01:39:01Z","updated_at":"2018-06-29T15:04:03Z","closed_at":"2018-06-29T12:00:14Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/SharePoint/PnP-Sites-Core/pulls/1820","html_url":"https://github.com/SharePoint/PnP-Sites-Core/pull/1820","diff_url":"https://github.com/SharePoint/PnP-Sites-Core/pull/1820.diff","patch_url":"https://github.com/SharePoint/PnP-Sites-Core/pull/1820.patch"},"body":"| Q               | A\r\n| --------------- | ---\r\n| Bug fix?        | yes\r\n| New feature?    | no\r\n| New sample?      | no\r\n| Related issues?  | \r\n\r\n#### What's in this Pull Request?\r\n- Removed unecessary Task.Run usage in synchronous methods to make code maintainability better and to avoid spawning unecessary tasks (reduced memory usage)\r\n\r\nHi @jansenbe \r\nReviewing my recent submissions around the async work I noticed some had a task.run wrapper and some had not.  \r\nI think this was a relic of the early discussions we had for async support and context sync.  \r\nI ran a little POC console application on my side Task.Run is supposed to defer the work on a thread pool but because we're using GetAwaiter().GetResult() right away we're blocking the current thread anyway.  \r\nThe idea here is to remove some proxy tasks and thread management overhead for synchronous work. That's also going to make the code maintenance easier for us.  \r\nhttps://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task.run?view=netframework-4.7.1#System_Threading_Tasks_Task_Run_System_Func_System_Threading_Tasks_Task__"},"comment":{"url":"https://api.github.com/repos/SharePoint/PnP-Sites-Core/issues/comments/401382246","html_url":"https://github.com/SharePoint/PnP-Sites-Core/pull/1820#issuecomment-401382246","issue_url":"https://api.github.com/repos/SharePoint/PnP-Sites-Core/issues/1820","id":401382246,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTM4MjI0Ng==","user":{"login":"jansenbe","id":7451219,"node_id":"MDQ6VXNlcjc0NTEyMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/7451219?v=4","gravatar_id":"","url":"https://api.github.com/users/jansenbe","html_url":"https://github.com/jansenbe","followers_url":"https://api.github.com/users/jansenbe/followers","following_url":"https://api.github.com/users/jansenbe/following{/other_user}","gists_url":"https://api.github.com/users/jansenbe/gists{/gist_id}","starred_url":"https://api.github.com/users/jansenbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jansenbe/subscriptions","organizations_url":"https://api.github.com/users/jansenbe/orgs","repos_url":"https://api.github.com/users/jansenbe/repos","events_url":"https://api.github.com/users/jansenbe/events{/privacy}","received_events_url":"https://api.github.com/users/jansenbe/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T15:04:03Z","updated_at":"2018-06-29T15:04:03Z","author_association":"CONTRIBUTOR","body":"I fixed the file/folder ones already...fix program is not (yet) shared...it's a little GUI that internal teams use to extract/apply pnp provisioning templates, will see if I can somehow share that one."}}
{"actor":{"display_login":"jansenbe"}}