{"action":"opened","number":3368,"pull_request":{"url":"https://api.github.com/repos/triplea-game/triplea/pulls/3368","id":181670633,"html_url":"https://github.com/triplea-game/triplea/pull/3368","diff_url":"https://github.com/triplea-game/triplea/pull/3368.diff","patch_url":"https://github.com/triplea-game/triplea/pull/3368.patch","issue_url":"https://api.github.com/repos/triplea-game/triplea/issues/3368","number":3368,"state":"open","locked":false,"title":"TripleaFrame cleanup","user":{"login":"RoiEXLab","id":8350879,"avatar_url":"https://avatars0.githubusercontent.com/u/8350879?v=4","gravatar_id":"","url":"https://api.github.com/users/RoiEXLab","html_url":"https://github.com/RoiEXLab","followers_url":"https://api.github.com/users/RoiEXLab/followers","following_url":"https://api.github.com/users/RoiEXLab/following{/other_user}","gists_url":"https://api.github.com/users/RoiEXLab/gists{/gist_id}","starred_url":"https://api.github.com/users/RoiEXLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoiEXLab/subscriptions","organizations_url":"https://api.github.com/users/RoiEXLab/orgs","repos_url":"https://api.github.com/users/RoiEXLab/repos","events_url":"https://api.github.com/users/RoiEXLab/events{/privacy}","received_events_url":"https://api.github.com/users/RoiEXLab/received_events","type":"User","site_admin":false},"body":"The original intent of this PR was to fix the loading screen before any started game, currently it freezes for a couple seconds (for TWW it freezes the screen for about 10 seconds on my machine which is just a bad experience).\r\nI tracked down the root cause to [`HeadedUiContext#internalSetMapDir`](https://github.com/triplea-game/triplea/blob/ed874fe16d21d1229b61f9b5a1949a7601c41c02/game-core/src/main/java/games/strategy/triplea/ui/HeadedUiContext.java#L71-L118), because this method is [being invoked on the EDT](https://github.com/triplea-game/triplea/blob/ed874fe16d21d1229b61f9b5a1949a7601c41c02/game-core/src/main/java/games/strategy/triplea/ui/TripleAFrame.java#L234) which causes the EDT to \"freeze\" for a couple seconds because it performs several blocking IO operations, namely loading polygon files and images, stuff that should be done outside of the EDT.\r\nI tried making resource loading asynchronous and making initialization sort-of-lazy (created a completeable future that'll only be waited for if needed).\r\nHowever too many objects require a MapData object, so that didn't really work.\r\n\r\nThe most obvious solution would then be to use our BackgroundTaskRunner class, but this class creates a waiting dialog on its own, a problem I recall facing in https://github.com/triplea-game/triplea/pull/2572#issuecomment-341964126 so the complete waiting dialog mechanism would need an overhaul to work with this.\r\nI'm not sure how I solved this issue the last time, probably because @ssoloff helped me out a lot there 😅 \r\nSo if anyone wants to pick up this task, or tell me how to do it...","created_at":"2018-04-14T22:42:10Z","updated_at":"2018-04-14T22:42:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/triplea-game/triplea/pulls/3368/commits","review_comments_url":"https://api.github.com/repos/triplea-game/triplea/pulls/3368/comments","review_comment_url":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}","comments_url":"https://api.github.com/repos/triplea-game/triplea/issues/3368/comments","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/849542b6c9f25dddbfabdc6f3d673f04ff5b296d","head":{"label":"RoiEXLab:triplea-frame-enhancements","ref":"triplea-frame-enhancements","sha":"849542b6c9f25dddbfabdc6f3d673f04ff5b296d","user":{"login":"RoiEXLab","id":8350879,"avatar_url":"https://avatars0.githubusercontent.com/u/8350879?v=4","gravatar_id":"","url":"https://api.github.com/users/RoiEXLab","html_url":"https://github.com/RoiEXLab","followers_url":"https://api.github.com/users/RoiEXLab/followers","following_url":"https://api.github.com/users/RoiEXLab/following{/other_user}","gists_url":"https://api.github.com/users/RoiEXLab/gists{/gist_id}","starred_url":"https://api.github.com/users/RoiEXLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoiEXLab/subscriptions","organizations_url":"https://api.github.com/users/RoiEXLab/orgs","repos_url":"https://api.github.com/users/RoiEXLab/repos","events_url":"https://api.github.com/users/RoiEXLab/events{/privacy}","received_events_url":"https://api.github.com/users/RoiEXLab/received_events","type":"User","site_admin":false},"repo":{"id":57201503,"name":"triplea","full_name":"RoiEXLab/triplea","owner":{"login":"RoiEXLab","id":8350879,"avatar_url":"https://avatars0.githubusercontent.com/u/8350879?v=4","gravatar_id":"","url":"https://api.github.com/users/RoiEXLab","html_url":"https://github.com/RoiEXLab","followers_url":"https://api.github.com/users/RoiEXLab/followers","following_url":"https://api.github.com/users/RoiEXLab/following{/other_user}","gists_url":"https://api.github.com/users/RoiEXLab/gists{/gist_id}","starred_url":"https://api.github.com/users/RoiEXLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoiEXLab/subscriptions","organizations_url":"https://api.github.com/users/RoiEXLab/orgs","repos_url":"https://api.github.com/users/RoiEXLab/repos","events_url":"https://api.github.com/users/RoiEXLab/events{/privacy}","received_events_url":"https://api.github.com/users/RoiEXLab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RoiEXLab/triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":true,"url":"https://api.github.com/repos/RoiEXLab/triplea","forks_url":"https://api.github.com/repos/RoiEXLab/triplea/forks","keys_url":"https://api.github.com/repos/RoiEXLab/triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RoiEXLab/triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RoiEXLab/triplea/teams","hooks_url":"https://api.github.com/repos/RoiEXLab/triplea/hooks","issue_events_url":"https://api.github.com/repos/RoiEXLab/triplea/issues/events{/number}","events_url":"https://api.github.com/repos/RoiEXLab/triplea/events","assignees_url":"https://api.github.com/repos/RoiEXLab/triplea/assignees{/user}","branches_url":"https://api.github.com/repos/RoiEXLab/triplea/branches{/branch}","tags_url":"https://api.github.com/repos/RoiEXLab/triplea/tags","blobs_url":"https://api.github.com/repos/RoiEXLab/triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RoiEXLab/triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RoiEXLab/triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/RoiEXLab/triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RoiEXLab/triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/RoiEXLab/triplea/languages","stargazers_url":"https://api.github.com/repos/RoiEXLab/triplea/stargazers","contributors_url":"https://api.github.com/repos/RoiEXLab/triplea/contributors","subscribers_url":"https://api.github.com/repos/RoiEXLab/triplea/subscribers","subscription_url":"https://api.github.com/repos/RoiEXLab/triplea/subscription","commits_url":"https://api.github.com/repos/RoiEXLab/triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/RoiEXLab/triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/RoiEXLab/triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/RoiEXLab/triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/RoiEXLab/triplea/contents/{+path}","compare_url":"https://api.github.com/repos/RoiEXLab/triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RoiEXLab/triplea/merges","archive_url":"https://api.github.com/repos/RoiEXLab/triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RoiEXLab/triplea/downloads","issues_url":"https://api.github.com/repos/RoiEXLab/triplea/issues{/number}","pulls_url":"https://api.github.com/repos/RoiEXLab/triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/RoiEXLab/triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/RoiEXLab/triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RoiEXLab/triplea/labels{/name}","releases_url":"https://api.github.com/repos/RoiEXLab/triplea/releases{/id}","deployments_url":"https://api.github.com/repos/RoiEXLab/triplea/deployments","created_at":"2016-04-27T09:32:28Z","updated_at":"2018-04-11T11:49:34Z","pushed_at":"2018-04-14T22:14:44Z","git_url":"git://github.com/RoiEXLab/triplea.git","ssh_url":"git@github.com:RoiEXLab/triplea.git","clone_url":"https://github.com/RoiEXLab/triplea.git","svn_url":"https://github.com/RoiEXLab/triplea","homepage":null,"size":737619,"stargazers_count":1,"watchers_count":1,"language":"Java","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":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"triplea-game:master","ref":"master","sha":"ed874fe16d21d1229b61f9b5a1949a7601c41c02","user":{"login":"triplea-game","id":13318615,"avatar_url":"https://avatars0.githubusercontent.com/u/13318615?v=4","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"repo":{"id":39766308,"name":"triplea","full_name":"triplea-game/triplea","owner":{"login":"triplea-game","id":13318615,"avatar_url":"https://avatars0.githubusercontent.com/u/13318615?v=4","gravatar_id":"","url":"https://api.github.com/users/triplea-game","html_url":"https://github.com/triplea-game","followers_url":"https://api.github.com/users/triplea-game/followers","following_url":"https://api.github.com/users/triplea-game/following{/other_user}","gists_url":"https://api.github.com/users/triplea-game/gists{/gist_id}","starred_url":"https://api.github.com/users/triplea-game/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/triplea-game/subscriptions","organizations_url":"https://api.github.com/users/triplea-game/orgs","repos_url":"https://api.github.com/users/triplea-game/repos","events_url":"https://api.github.com/users/triplea-game/events{/privacy}","received_events_url":"https://api.github.com/users/triplea-game/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/triplea-game/triplea","description":"TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.","fork":false,"url":"https://api.github.com/repos/triplea-game/triplea","forks_url":"https://api.github.com/repos/triplea-game/triplea/forks","keys_url":"https://api.github.com/repos/triplea-game/triplea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/triplea-game/triplea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/triplea-game/triplea/teams","hooks_url":"https://api.github.com/repos/triplea-game/triplea/hooks","issue_events_url":"https://api.github.com/repos/triplea-game/triplea/issues/events{/number}","events_url":"https://api.github.com/repos/triplea-game/triplea/events","assignees_url":"https://api.github.com/repos/triplea-game/triplea/assignees{/user}","branches_url":"https://api.github.com/repos/triplea-game/triplea/branches{/branch}","tags_url":"https://api.github.com/repos/triplea-game/triplea/tags","blobs_url":"https://api.github.com/repos/triplea-game/triplea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/triplea-game/triplea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/triplea-game/triplea/git/refs{/sha}","trees_url":"https://api.github.com/repos/triplea-game/triplea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/triplea-game/triplea/statuses/{sha}","languages_url":"https://api.github.com/repos/triplea-game/triplea/languages","stargazers_url":"https://api.github.com/repos/triplea-game/triplea/stargazers","contributors_url":"https://api.github.com/repos/triplea-game/triplea/contributors","subscribers_url":"https://api.github.com/repos/triplea-game/triplea/subscribers","subscription_url":"https://api.github.com/repos/triplea-game/triplea/subscription","commits_url":"https://api.github.com/repos/triplea-game/triplea/commits{/sha}","git_commits_url":"https://api.github.com/repos/triplea-game/triplea/git/commits{/sha}","comments_url":"https://api.github.com/repos/triplea-game/triplea/comments{/number}","issue_comment_url":"https://api.github.com/repos/triplea-game/triplea/issues/comments{/number}","contents_url":"https://api.github.com/repos/triplea-game/triplea/contents/{+path}","compare_url":"https://api.github.com/repos/triplea-game/triplea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/triplea-game/triplea/merges","archive_url":"https://api.github.com/repos/triplea-game/triplea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/triplea-game/triplea/downloads","issues_url":"https://api.github.com/repos/triplea-game/triplea/issues{/number}","pulls_url":"https://api.github.com/repos/triplea-game/triplea/pulls{/number}","milestones_url":"https://api.github.com/repos/triplea-game/triplea/milestones{/number}","notifications_url":"https://api.github.com/repos/triplea-game/triplea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/triplea-game/triplea/labels{/name}","releases_url":"https://api.github.com/repos/triplea-game/triplea/releases{/id}","deployments_url":"https://api.github.com/repos/triplea-game/triplea/deployments","created_at":"2015-07-27T09:32:58Z","updated_at":"2018-04-13T19:38:25Z","pushed_at":"2018-04-14T19:17:47Z","git_url":"git://github.com/triplea-game/triplea.git","ssh_url":"git@github.com:triplea-game/triplea.git","clone_url":"https://github.com/triplea-game/triplea.git","svn_url":"https://github.com/triplea-game/triplea","homepage":null,"size":746258,"stargazers_count":95,"watchers_count":95,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"archived":false,"open_issues_count":104,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":52,"open_issues":104,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/3368"},"html":{"href":"https://github.com/triplea-game/triplea/pull/3368"},"issue":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/3368"},"comments":{"href":"https://api.github.com/repos/triplea-game/triplea/issues/3368/comments"},"review_comments":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/3368/comments"},"review_comment":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/triplea-game/triplea/pulls/3368/commits"},"statuses":{"href":"https://api.github.com/repos/triplea-game/triplea/statuses/849542b6c9f25dddbfabdc6f3d673f04ff5b296d"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":31,"deletions":96,"changed_files":2}}
{"actor":{"display_login":"RoiEXLab"}}