{"action":"created","issue":{"url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4501","repository_url":"https://api.github.com/repos/gitextensions/gitextensions","labels_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4501/labels{/name}","comments_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4501/comments","events_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4501/events","html_url":"https://github.com/gitextensions/gitextensions/pull/4501","id":298119669,"number":4501,"title":"More async","user":{"login":"drewnoakes","id":350947,"avatar_url":"https://avatars2.githubusercontent.com/u/350947?v=4","gravatar_id":"","url":"https://api.github.com/users/drewnoakes","html_url":"https://github.com/drewnoakes","followers_url":"https://api.github.com/users/drewnoakes/followers","following_url":"https://api.github.com/users/drewnoakes/following{/other_user}","gists_url":"https://api.github.com/users/drewnoakes/gists{/gist_id}","starred_url":"https://api.github.com/users/drewnoakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewnoakes/subscriptions","organizations_url":"https://api.github.com/users/drewnoakes/orgs","repos_url":"https://api.github.com/users/drewnoakes/repos","events_url":"https://api.github.com/users/drewnoakes/events{/privacy}","received_events_url":"https://api.github.com/users/drewnoakes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-02-18T21:25:32Z","updated_at":"2018-02-22T09:51:26Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/gitextensions/gitextensions/pulls/4501","html_url":"https://github.com/gitextensions/gitextensions/pull/4501","diff_url":"https://github.com/gitextensions/gitextensions/pull/4501.diff","patch_url":"https://github.com/gitextensions/gitextensions/pull/4501.patch"},"body":"Follows on from #4474.\r\n\r\nChanges proposed in this pull request:\r\n - Make the methods that are blocking the threadpool async, to keep them free.\r\n\r\nHas been tested on:\r\n - GIT 2.16\r\n - Windows 10\r\n\r\n---\r\n \r\n@jbialobr I went through that stack and made it async \"all the way up\". I did this for a few other common pathways, and I no longer see any freeze. Could you please build this `async` branch on your machine and see whether it works for you?\r\n\r\nApproach:\r\n\r\n- Find a stack that's commonly blocking a thread pool (worker) thread\r\n- Find a the lowest-level sync method that should be made async\r\n- Duplicate it, making the copy async\r\n- Mark the original `[Obsolete]`\r\n- Walk up the stack, making callers async using the same process described above\r\n\r\nBy leaving obsolete methods we are able to migrate code incrementally, yet not lose track of where we need to go back and tidy up. This approach could eventually convert the entire codebase to async.\r\n\r\nCurrently compiler warnings fail the build. I've had to exclude warning 0612 (use of obsolete member) from a few projects. We can revert this once migration is complete.\r\n\r\nOf course this all depends upon how performance is. Please test this out, and take a look at the code. If it seems promising, I'll continue with it a bit more and report back."},"comment":{"url":"https://api.github.com/repos/gitextensions/gitextensions/issues/comments/367626357","html_url":"https://github.com/gitextensions/gitextensions/pull/4501#issuecomment-367626357","issue_url":"https://api.github.com/repos/gitextensions/gitextensions/issues/4501","id":367626357,"user":{"login":"drewnoakes","id":350947,"avatar_url":"https://avatars2.githubusercontent.com/u/350947?v=4","gravatar_id":"","url":"https://api.github.com/users/drewnoakes","html_url":"https://github.com/drewnoakes","followers_url":"https://api.github.com/users/drewnoakes/followers","following_url":"https://api.github.com/users/drewnoakes/following{/other_user}","gists_url":"https://api.github.com/users/drewnoakes/gists{/gist_id}","starred_url":"https://api.github.com/users/drewnoakes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drewnoakes/subscriptions","organizations_url":"https://api.github.com/users/drewnoakes/orgs","repos_url":"https://api.github.com/users/drewnoakes/repos","events_url":"https://api.github.com/users/drewnoakes/events{/privacy}","received_events_url":"https://api.github.com/users/drewnoakes/received_events","type":"User","site_admin":false},"created_at":"2018-02-22T09:51:26Z","updated_at":"2018-02-22T09:51:26Z","author_association":"CONTRIBUTOR","body":"> GitCommandRunner which would be the only class in the whole app responsible for executing commands\r\n\r\nI've noticed in debugging that there are many indirections in the git command execution stack.\r\n\r\n![image](https://user-images.githubusercontent.com/350947/36531465-e4ee8a54-17b5-11e8-8e60-8a4f74df6249.png)\r\n\r\nWith these being async, that's a lot of additional allocation and overhead. I too would like to consolidate such code into a single place. That would also allow throttling the number of processes, tracking durations and so forth."}}
{"actor":{"display_login":"drewnoakes"}}