{"action":"closed","number":2617,"pull_request":{"url":"https://api.github.com/repos/KSP-CKAN/CKAN/pulls/2617","id":239725203,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5NzI1MjAz","html_url":"https://github.com/KSP-CKAN/CKAN/pull/2617","diff_url":"https://github.com/KSP-CKAN/CKAN/pull/2617.diff","patch_url":"https://github.com/KSP-CKAN/CKAN/pull/2617.patch","issue_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/2617","number":2617,"state":"closed","locked":false,"title":"Show progress bar while loading registry","user":{"login":"HebaruSan","id":1559108,"node_id":"MDQ6VXNlcjE1NTkxMDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1559108?v=4","gravatar_id":"","url":"https://api.github.com/users/HebaruSan","html_url":"https://github.com/HebaruSan","followers_url":"https://api.github.com/users/HebaruSan/followers","following_url":"https://api.github.com/users/HebaruSan/following{/other_user}","gists_url":"https://api.github.com/users/HebaruSan/gists{/gist_id}","starred_url":"https://api.github.com/users/HebaruSan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HebaruSan/subscriptions","organizations_url":"https://api.github.com/users/HebaruSan/orgs","repos_url":"https://api.github.com/users/HebaruSan/repos","events_url":"https://api.github.com/users/HebaruSan/events{/privacy}","received_events_url":"https://api.github.com/users/HebaruSan/received_events","type":"User","site_admin":false},"body":"## Problem\r\n\r\nRefreshing the mod list in GUI involves two steps:\r\n\r\n1. Getting the new data from the server\r\n2. Updating the lists and filters\r\n\r\nStep 2 can take several seconds. While it's happening, the window freezes, because the intensive processing is done on the GUI thread (whereas step 1 has a progress bar). The freeze also happens when switching instances and changing version compatibility.\r\n\r\n## Changes\r\n\r\nNow while the mod list is loading, the processing takes place in a background thread, and the progress bar screen is shown with messages indicating which step we're on (helpful for identifying slow pieces!):\r\n\r\n![image](https://user-images.githubusercontent.com/1559108/50202310-95181e00-0355-11e9-808a-98eeb18e069d.png)\r\n\r\nThis keeps the UI responsive and assures the user that it hasn't crashed. When finished, the tab is hidden.\r\n\r\n## Side performance tweak\r\n\r\nWhile implementing this, I found out that the slowest step is `Registry.Available`, with a typical run time of up to a few seconds (I thought it would be loading the data from the `registry.json` file).\r\n\r\nUnrelated to the above changes, this function was always called at the end of a repo update, but that was just to generate an `int` return value that isn't even used most of the time. So now those functions return `bool` and just return `true` instead of calling `Registry.Available`, and calling code is updated to call `Registry.Available` when it's actually needed. This should slightly speed up refreshes in GUI.","created_at":"2018-12-19T06:26:28Z","updated_at":"2018-12-26T06:58:23Z","closed_at":"2018-12-26T06:58:23Z","merged_at":"2018-12-26T06:58:23Z","merge_commit_sha":"cea8ac96cc6c9217a39dfc79e20c90a9369168df","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":122535236,"node_id":"MDU6TGFiZWwxMjI1MzUyMzY=","url":"https://api.github.com/repos/KSP-CKAN/CKAN/labels/Enhancement","name":"Enhancement","color":"eb6420","default":false},{"id":139464212,"node_id":"MDU6TGFiZWwxMzk0NjQyMTI=","url":"https://api.github.com/repos/KSP-CKAN/CKAN/labels/GUI","name":"GUI","color":"006b75","default":false},{"id":139897064,"node_id":"MDU6TGFiZWwxMzk4OTcwNjQ=","url":"https://api.github.com/repos/KSP-CKAN/CKAN/labels/Pull%20request","name":"Pull request","color":"1d76db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/KSP-CKAN/CKAN/pulls/2617/commits","review_comments_url":"https://api.github.com/repos/KSP-CKAN/CKAN/pulls/2617/comments","review_comment_url":"https://api.github.com/repos/KSP-CKAN/CKAN/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/2617/comments","statuses_url":"https://api.github.com/repos/KSP-CKAN/CKAN/statuses/cea8ac96cc6c9217a39dfc79e20c90a9369168df","head":{"label":"HebaruSan:feature/load-progressbar","ref":"feature/load-progressbar","sha":"cea8ac96cc6c9217a39dfc79e20c90a9369168df","user":{"login":"HebaruSan","id":1559108,"node_id":"MDQ6VXNlcjE1NTkxMDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1559108?v=4","gravatar_id":"","url":"https://api.github.com/users/HebaruSan","html_url":"https://github.com/HebaruSan","followers_url":"https://api.github.com/users/HebaruSan/followers","following_url":"https://api.github.com/users/HebaruSan/following{/other_user}","gists_url":"https://api.github.com/users/HebaruSan/gists{/gist_id}","starred_url":"https://api.github.com/users/HebaruSan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HebaruSan/subscriptions","organizations_url":"https://api.github.com/users/HebaruSan/orgs","repos_url":"https://api.github.com/users/HebaruSan/repos","events_url":"https://api.github.com/users/HebaruSan/events{/privacy}","received_events_url":"https://api.github.com/users/HebaruSan/received_events","type":"User","site_admin":false},"repo":{"id":101696387,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE2OTYzODc=","name":"CKAN","full_name":"HebaruSan/CKAN","private":false,"owner":{"login":"HebaruSan","id":1559108,"node_id":"MDQ6VXNlcjE1NTkxMDg=","avatar_url":"https://avatars2.githubusercontent.com/u/1559108?v=4","gravatar_id":"","url":"https://api.github.com/users/HebaruSan","html_url":"https://github.com/HebaruSan","followers_url":"https://api.github.com/users/HebaruSan/followers","following_url":"https://api.github.com/users/HebaruSan/following{/other_user}","gists_url":"https://api.github.com/users/HebaruSan/gists{/gist_id}","starred_url":"https://api.github.com/users/HebaruSan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HebaruSan/subscriptions","organizations_url":"https://api.github.com/users/HebaruSan/orgs","repos_url":"https://api.github.com/users/HebaruSan/repos","events_url":"https://api.github.com/users/HebaruSan/events{/privacy}","received_events_url":"https://api.github.com/users/HebaruSan/received_events","type":"User","site_admin":false},"html_url":"https://github.com/HebaruSan/CKAN","description":"The Comprehensive Kerbal Archive Network","fork":true,"url":"https://api.github.com/repos/HebaruSan/CKAN","forks_url":"https://api.github.com/repos/HebaruSan/CKAN/forks","keys_url":"https://api.github.com/repos/HebaruSan/CKAN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HebaruSan/CKAN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HebaruSan/CKAN/teams","hooks_url":"https://api.github.com/repos/HebaruSan/CKAN/hooks","issue_events_url":"https://api.github.com/repos/HebaruSan/CKAN/issues/events{/number}","events_url":"https://api.github.com/repos/HebaruSan/CKAN/events","assignees_url":"https://api.github.com/repos/HebaruSan/CKAN/assignees{/user}","branches_url":"https://api.github.com/repos/HebaruSan/CKAN/branches{/branch}","tags_url":"https://api.github.com/repos/HebaruSan/CKAN/tags","blobs_url":"https://api.github.com/repos/HebaruSan/CKAN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HebaruSan/CKAN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HebaruSan/CKAN/git/refs{/sha}","trees_url":"https://api.github.com/repos/HebaruSan/CKAN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HebaruSan/CKAN/statuses/{sha}","languages_url":"https://api.github.com/repos/HebaruSan/CKAN/languages","stargazers_url":"https://api.github.com/repos/HebaruSan/CKAN/stargazers","contributors_url":"https://api.github.com/repos/HebaruSan/CKAN/contributors","subscribers_url":"https://api.github.com/repos/HebaruSan/CKAN/subscribers","subscription_url":"https://api.github.com/repos/HebaruSan/CKAN/subscription","commits_url":"https://api.github.com/repos/HebaruSan/CKAN/commits{/sha}","git_commits_url":"https://api.github.com/repos/HebaruSan/CKAN/git/commits{/sha}","comments_url":"https://api.github.com/repos/HebaruSan/CKAN/comments{/number}","issue_comment_url":"https://api.github.com/repos/HebaruSan/CKAN/issues/comments{/number}","contents_url":"https://api.github.com/repos/HebaruSan/CKAN/contents/{+path}","compare_url":"https://api.github.com/repos/HebaruSan/CKAN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HebaruSan/CKAN/merges","archive_url":"https://api.github.com/repos/HebaruSan/CKAN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HebaruSan/CKAN/downloads","issues_url":"https://api.github.com/repos/HebaruSan/CKAN/issues{/number}","pulls_url":"https://api.github.com/repos/HebaruSan/CKAN/pulls{/number}","milestones_url":"https://api.github.com/repos/HebaruSan/CKAN/milestones{/number}","notifications_url":"https://api.github.com/repos/HebaruSan/CKAN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HebaruSan/CKAN/labels{/name}","releases_url":"https://api.github.com/repos/HebaruSan/CKAN/releases{/id}","deployments_url":"https://api.github.com/repos/HebaruSan/CKAN/deployments","created_at":"2017-08-28T23:16:51Z","updated_at":"2018-08-30T02:59:59Z","pushed_at":"2018-12-26T06:54:13Z","git_url":"git://github.com/HebaruSan/CKAN.git","ssh_url":"git@github.com:HebaruSan/CKAN.git","clone_url":"https://github.com/HebaruSan/CKAN.git","svn_url":"https://github.com/HebaruSan/CKAN","homepage":"","size":26644,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"KSP-CKAN:master","ref":"master","sha":"510e77d85179b6f8458b5f0a749f3dfdbcd201d0","user":{"login":"KSP-CKAN","id":9023970,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMjM5NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/9023970?v=4","gravatar_id":"","url":"https://api.github.com/users/KSP-CKAN","html_url":"https://github.com/KSP-CKAN","followers_url":"https://api.github.com/users/KSP-CKAN/followers","following_url":"https://api.github.com/users/KSP-CKAN/following{/other_user}","gists_url":"https://api.github.com/users/KSP-CKAN/gists{/gist_id}","starred_url":"https://api.github.com/users/KSP-CKAN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KSP-CKAN/subscriptions","organizations_url":"https://api.github.com/users/KSP-CKAN/orgs","repos_url":"https://api.github.com/users/KSP-CKAN/repos","events_url":"https://api.github.com/users/KSP-CKAN/events{/privacy}","received_events_url":"https://api.github.com/users/KSP-CKAN/received_events","type":"Organization","site_admin":false},"repo":{"id":23050594,"node_id":"MDEwOlJlcG9zaXRvcnkyMzA1MDU5NA==","name":"CKAN","full_name":"KSP-CKAN/CKAN","private":false,"owner":{"login":"KSP-CKAN","id":9023970,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkwMjM5NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/9023970?v=4","gravatar_id":"","url":"https://api.github.com/users/KSP-CKAN","html_url":"https://github.com/KSP-CKAN","followers_url":"https://api.github.com/users/KSP-CKAN/followers","following_url":"https://api.github.com/users/KSP-CKAN/following{/other_user}","gists_url":"https://api.github.com/users/KSP-CKAN/gists{/gist_id}","starred_url":"https://api.github.com/users/KSP-CKAN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KSP-CKAN/subscriptions","organizations_url":"https://api.github.com/users/KSP-CKAN/orgs","repos_url":"https://api.github.com/users/KSP-CKAN/repos","events_url":"https://api.github.com/users/KSP-CKAN/events{/privacy}","received_events_url":"https://api.github.com/users/KSP-CKAN/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/KSP-CKAN/CKAN","description":"The Comprehensive Kerbal Archive Network","fork":false,"url":"https://api.github.com/repos/KSP-CKAN/CKAN","forks_url":"https://api.github.com/repos/KSP-CKAN/CKAN/forks","keys_url":"https://api.github.com/repos/KSP-CKAN/CKAN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KSP-CKAN/CKAN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KSP-CKAN/CKAN/teams","hooks_url":"https://api.github.com/repos/KSP-CKAN/CKAN/hooks","issue_events_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/events{/number}","events_url":"https://api.github.com/repos/KSP-CKAN/CKAN/events","assignees_url":"https://api.github.com/repos/KSP-CKAN/CKAN/assignees{/user}","branches_url":"https://api.github.com/repos/KSP-CKAN/CKAN/branches{/branch}","tags_url":"https://api.github.com/repos/KSP-CKAN/CKAN/tags","blobs_url":"https://api.github.com/repos/KSP-CKAN/CKAN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KSP-CKAN/CKAN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KSP-CKAN/CKAN/git/refs{/sha}","trees_url":"https://api.github.com/repos/KSP-CKAN/CKAN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KSP-CKAN/CKAN/statuses/{sha}","languages_url":"https://api.github.com/repos/KSP-CKAN/CKAN/languages","stargazers_url":"https://api.github.com/repos/KSP-CKAN/CKAN/stargazers","contributors_url":"https://api.github.com/repos/KSP-CKAN/CKAN/contributors","subscribers_url":"https://api.github.com/repos/KSP-CKAN/CKAN/subscribers","subscription_url":"https://api.github.com/repos/KSP-CKAN/CKAN/subscription","commits_url":"https://api.github.com/repos/KSP-CKAN/CKAN/commits{/sha}","git_commits_url":"https://api.github.com/repos/KSP-CKAN/CKAN/git/commits{/sha}","comments_url":"https://api.github.com/repos/KSP-CKAN/CKAN/comments{/number}","issue_comment_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/comments{/number}","contents_url":"https://api.github.com/repos/KSP-CKAN/CKAN/contents/{+path}","compare_url":"https://api.github.com/repos/KSP-CKAN/CKAN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KSP-CKAN/CKAN/merges","archive_url":"https://api.github.com/repos/KSP-CKAN/CKAN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KSP-CKAN/CKAN/downloads","issues_url":"https://api.github.com/repos/KSP-CKAN/CKAN/issues{/number}","pulls_url":"https://api.github.com/repos/KSP-CKAN/CKAN/pulls{/number}","milestones_url":"https://api.github.com/repos/KSP-CKAN/CKAN/milestones{/number}","notifications_url":"https://api.github.com/repos/KSP-CKAN/CKAN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KSP-CKAN/CKAN/labels{/name}","releases_url":"https://api.github.com/repos/KSP-CKAN/CKAN/releases{/id}","deployments_url":"https://api.github.com/repos/KSP-CKAN/CKAN/deployments","created_at":"2014-08-17T21:11:54Z","updated_at":"2018-12-26T06:53:16Z","pushed_at":"2018-12-26T06:58:21Z","git_url":"git://github.com/KSP-CKAN/CKAN.git","ssh_url":"git@github.com:KSP-CKAN/CKAN.git","clone_url":"https://github.com/KSP-CKAN/CKAN.git","svn_url":"https://github.com/KSP-CKAN/CKAN","homepage":"http://forum.kerbalspaceprogram.com/index.php?/topic/154922-ckan","size":26617,"stargazers_count":852,"watchers_count":852,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":219,"mirror_url":null,"archived":false,"open_issues_count":203,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":219,"open_issues":203,"watchers":852,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KSP-CKAN/CKAN/pulls/2617"},"html":{"href":"https://github.com/KSP-CKAN/CKAN/pull/2617"},"issue":{"href":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/2617"},"comments":{"href":"https://api.github.com/repos/KSP-CKAN/CKAN/issues/2617/comments"},"review_comments":{"href":"https://api.github.com/repos/KSP-CKAN/CKAN/pulls/2617/comments"},"review_comment":{"href":"https://api.github.com/repos/KSP-CKAN/CKAN/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KSP-CKAN/CKAN/pulls/2617/commits"},"statuses":{"href":"https://api.github.com/repos/KSP-CKAN/CKAN/statuses/cea8ac96cc6c9217a39dfc79e20c90a9369168df"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"politas","id":2109967,"node_id":"MDQ6VXNlcjIxMDk5Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/2109967?v=4","gravatar_id":"","url":"https://api.github.com/users/politas","html_url":"https://github.com/politas","followers_url":"https://api.github.com/users/politas/followers","following_url":"https://api.github.com/users/politas/following{/other_user}","gists_url":"https://api.github.com/users/politas/gists{/gist_id}","starred_url":"https://api.github.com/users/politas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/politas/subscriptions","organizations_url":"https://api.github.com/users/politas/orgs","repos_url":"https://api.github.com/users/politas/repos","events_url":"https://api.github.com/users/politas/events{/privacy}","received_events_url":"https://api.github.com/users/politas/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":40,"deletions":12,"changed_files":4}}
{"actor":{"display_login":"politas"}}