{"action":"created","comment":{"url":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/comments/227679519","pull_request_review_id":167774340,"id":227679519,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzY3OTUxOQ==","diff_hunk":"@@ -3402,15 +3409,15 @@ public String addNPC(NPC npc, boolean isImported) throws Exception {\n \t\t\t}catch(NumberFormatException ex) {\n \t\t\t\ttallyCount = Integer.parseInt(npc.getId().split(\",\")[0]);\n \t\t\t}\n-\t\t\tif(tallyCount>npcTally) {\n-\t\t\t\tnpcTally = tallyCount;\n+\t\t\tif(tallyCount>npcTally.get()) {\n+\t\t\t\tnpcTally.set(tallyCount);","path":"src/com/lilithsthrone/game/Game.java","position":226,"original_position":226,"commit_id":"6d505898fab5663233ff284d2346fe10439da898","original_commit_id":"6d505898fab5663233ff284d2346fe10439da898","user":{"login":"AlacoGit","id":37576132,"node_id":"MDQ6VXNlcjM3NTc2MTMy","avatar_url":"https://avatars3.githubusercontent.com/u/37576132?v=4","gravatar_id":"","url":"https://api.github.com/users/AlacoGit","html_url":"https://github.com/AlacoGit","followers_url":"https://api.github.com/users/AlacoGit/followers","following_url":"https://api.github.com/users/AlacoGit/following{/other_user}","gists_url":"https://api.github.com/users/AlacoGit/gists{/gist_id}","starred_url":"https://api.github.com/users/AlacoGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlacoGit/subscriptions","organizations_url":"https://api.github.com/users/AlacoGit/orgs","repos_url":"https://api.github.com/users/AlacoGit/repos","events_url":"https://api.github.com/users/AlacoGit/events{/privacy}","received_events_url":"https://api.github.com/users/AlacoGit/received_events","type":"User","site_admin":false},"body":"You are correct, thanks for spotting that!","created_at":"2018-10-24T08:01:12Z","updated_at":"2018-10-24T08:01:12Z","html_url":"https://github.com/Innoxia/liliths-throne-public/pull/949#discussion_r227679519","pull_request_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/949","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/comments/227679519"},"html":{"href":"https://github.com/Innoxia/liliths-throne-public/pull/949#discussion_r227679519"},"pull_request":{"href":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/949"}},"in_reply_to_id":227653709},"pull_request":{"url":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/949","id":224889857,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0ODg5ODU3","html_url":"https://github.com/Innoxia/liliths-throne-public/pull/949","diff_url":"https://github.com/Innoxia/liliths-throne-public/pull/949.diff","patch_url":"https://github.com/Innoxia/liliths-throne-public/pull/949.patch","issue_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/issues/949","number":949,"state":"open","locked":false,"title":"Faster save loading","user":{"login":"AlacoGit","id":37576132,"node_id":"MDQ6VXNlcjM3NTc2MTMy","avatar_url":"https://avatars3.githubusercontent.com/u/37576132?v=4","gravatar_id":"","url":"https://api.github.com/users/AlacoGit","html_url":"https://github.com/AlacoGit","followers_url":"https://api.github.com/users/AlacoGit/followers","following_url":"https://api.github.com/users/AlacoGit/following{/other_user}","gists_url":"https://api.github.com/users/AlacoGit/gists{/gist_id}","starred_url":"https://api.github.com/users/AlacoGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlacoGit/subscriptions","organizations_url":"https://api.github.com/users/AlacoGit/orgs","repos_url":"https://api.github.com/users/AlacoGit/repos","events_url":"https://api.github.com/users/AlacoGit/events{/privacy}","received_events_url":"https://api.github.com/users/AlacoGit/received_events","type":"User","site_admin":false},"body":"### Things to include in a large Pull Request:\r\n\r\n- What is the purpose of the pull request?\r\n\r\nThe main purpose of this patch is to speedup the loading of saves, especially ones with large amounts of characters.\r\nThe patch accomplishes this by using Javas `streams` API to parallelize loading of NPCs during save-loading. \r\nWhile the individual performance gains will wary between users, during testing an average gain of 50% was observed.\r\n\r\nThis is my first time really working with `streams` so any feedback is very welcome.\r\n\r\n- Give a brief description of what you changed or added.\r\n\r\n Parts of `importGame` was rewritten to use the `streams` API, some other small misc changes was also made.\r\n\r\n A new method `public safeAddNPC(final NPC npc, boolean isImported)` was added, this class wraps the original `addNPC` to catch any exceptions thrown since lambdas can't contain exceptional methods.\r\n\r\n `npcTally` in `Game.java` was rewritten to use `AtomicInteger` instead of a regular int, this to prevent race conditions. Similarly the implementation of `NPCMap` was changed to `concurrentHashMap` for the same reasons.\r\n\r\n Large parts of the parsing logic in `UtilText` was thread-hostile and was refactored. As a part of this `ParserCommand.parse` was changed to also take a `GameCharacter` argument\r\n\r\n\r\n- Are any new graphical assets required?\r\n\r\n No\r\n\r\n- Has this change been tested? If so, mention the version number that the test was based on.\r\n\r\n Tested on 0.2.10.8 and the pre-release version of 0.2.11\r\n\r\n- So we have a better idea of who you are, what is your Discord Handle?\r\n\r\n AlacoGit on Discord\r\n- If you want quick feedback, you can use @Innoxia, or jump on the Lilith's Throne discord and send Innoxia a PM.\r\n","created_at":"2018-10-23T04:13:07Z","updated_at":"2018-10-24T08:01:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d1c4ebf13093eb8b4c046dfd109a9da655d230b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/949/commits","review_comments_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/949/comments","review_comment_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/issues/949/comments","statuses_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/statuses/6d505898fab5663233ff284d2346fe10439da898","head":{"label":"AlacoGit:betterLoadNPC","ref":"betterLoadNPC","sha":"6d505898fab5663233ff284d2346fe10439da898","user":{"login":"AlacoGit","id":37576132,"node_id":"MDQ6VXNlcjM3NTc2MTMy","avatar_url":"https://avatars3.githubusercontent.com/u/37576132?v=4","gravatar_id":"","url":"https://api.github.com/users/AlacoGit","html_url":"https://github.com/AlacoGit","followers_url":"https://api.github.com/users/AlacoGit/followers","following_url":"https://api.github.com/users/AlacoGit/following{/other_user}","gists_url":"https://api.github.com/users/AlacoGit/gists{/gist_id}","starred_url":"https://api.github.com/users/AlacoGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlacoGit/subscriptions","organizations_url":"https://api.github.com/users/AlacoGit/orgs","repos_url":"https://api.github.com/users/AlacoGit/repos","events_url":"https://api.github.com/users/AlacoGit/events{/privacy}","received_events_url":"https://api.github.com/users/AlacoGit/received_events","type":"User","site_admin":false},"repo":{"id":126144520,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYxNDQ1MjA=","name":"liliths-throne-public","full_name":"AlacoGit/liliths-throne-public","private":false,"owner":{"login":"AlacoGit","id":37576132,"node_id":"MDQ6VXNlcjM3NTc2MTMy","avatar_url":"https://avatars3.githubusercontent.com/u/37576132?v=4","gravatar_id":"","url":"https://api.github.com/users/AlacoGit","html_url":"https://github.com/AlacoGit","followers_url":"https://api.github.com/users/AlacoGit/followers","following_url":"https://api.github.com/users/AlacoGit/following{/other_user}","gists_url":"https://api.github.com/users/AlacoGit/gists{/gist_id}","starred_url":"https://api.github.com/users/AlacoGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlacoGit/subscriptions","organizations_url":"https://api.github.com/users/AlacoGit/orgs","repos_url":"https://api.github.com/users/AlacoGit/repos","events_url":"https://api.github.com/users/AlacoGit/events{/privacy}","received_events_url":"https://api.github.com/users/AlacoGit/received_events","type":"User","site_admin":false},"html_url":"https://github.com/AlacoGit/liliths-throne-public","description":"Public repository for Lilith's Throne. (18+)","fork":true,"url":"https://api.github.com/repos/AlacoGit/liliths-throne-public","forks_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/forks","keys_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/teams","hooks_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/hooks","issue_events_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/issues/events{/number}","events_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/events","assignees_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/assignees{/user}","branches_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/branches{/branch}","tags_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/tags","blobs_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/statuses/{sha}","languages_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/languages","stargazers_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/stargazers","contributors_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/contributors","subscribers_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/subscribers","subscription_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/subscription","commits_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/issues/comments{/number}","contents_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/contents/{+path}","compare_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/merges","archive_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/downloads","issues_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/issues{/number}","pulls_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/pulls{/number}","milestones_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/milestones{/number}","notifications_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/labels{/name}","releases_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/releases{/id}","deployments_url":"https://api.github.com/repos/AlacoGit/liliths-throne-public/deployments","created_at":"2018-03-21T08:10:14Z","updated_at":"2018-03-22T05:08:31Z","pushed_at":"2018-10-23T03:25:56Z","git_url":"git://github.com/AlacoGit/liliths-throne-public.git","ssh_url":"git@github.com:AlacoGit/liliths-throne-public.git","clone_url":"https://github.com/AlacoGit/liliths-throne-public.git","svn_url":"https://github.com/AlacoGit/liliths-throne-public","homepage":"","size":61598,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Innoxia:dev","ref":"dev","sha":"860279be8c8acfc4f7404dc09e04d640fd68d1a0","user":{"login":"Innoxia","id":25914384,"node_id":"MDQ6VXNlcjI1OTE0Mzg0","avatar_url":"https://avatars2.githubusercontent.com/u/25914384?v=4","gravatar_id":"","url":"https://api.github.com/users/Innoxia","html_url":"https://github.com/Innoxia","followers_url":"https://api.github.com/users/Innoxia/followers","following_url":"https://api.github.com/users/Innoxia/following{/other_user}","gists_url":"https://api.github.com/users/Innoxia/gists{/gist_id}","starred_url":"https://api.github.com/users/Innoxia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Innoxia/subscriptions","organizations_url":"https://api.github.com/users/Innoxia/orgs","repos_url":"https://api.github.com/users/Innoxia/repos","events_url":"https://api.github.com/users/Innoxia/events{/privacy}","received_events_url":"https://api.github.com/users/Innoxia/received_events","type":"User","site_admin":false},"repo":{"id":98690886,"node_id":"MDEwOlJlcG9zaXRvcnk5ODY5MDg4Ng==","name":"liliths-throne-public","full_name":"Innoxia/liliths-throne-public","private":false,"owner":{"login":"Innoxia","id":25914384,"node_id":"MDQ6VXNlcjI1OTE0Mzg0","avatar_url":"https://avatars2.githubusercontent.com/u/25914384?v=4","gravatar_id":"","url":"https://api.github.com/users/Innoxia","html_url":"https://github.com/Innoxia","followers_url":"https://api.github.com/users/Innoxia/followers","following_url":"https://api.github.com/users/Innoxia/following{/other_user}","gists_url":"https://api.github.com/users/Innoxia/gists{/gist_id}","starred_url":"https://api.github.com/users/Innoxia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Innoxia/subscriptions","organizations_url":"https://api.github.com/users/Innoxia/orgs","repos_url":"https://api.github.com/users/Innoxia/repos","events_url":"https://api.github.com/users/Innoxia/events{/privacy}","received_events_url":"https://api.github.com/users/Innoxia/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Innoxia/liliths-throne-public","description":"Public repository for Lilith's Throne. (18+)","fork":false,"url":"https://api.github.com/repos/Innoxia/liliths-throne-public","forks_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/forks","keys_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/teams","hooks_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/hooks","issue_events_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/issues/events{/number}","events_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/events","assignees_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/assignees{/user}","branches_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/branches{/branch}","tags_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/tags","blobs_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/git/refs{/sha}","trees_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/statuses/{sha}","languages_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/languages","stargazers_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/stargazers","contributors_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/contributors","subscribers_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/subscribers","subscription_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/subscription","commits_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/commits{/sha}","git_commits_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/git/commits{/sha}","comments_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/comments{/number}","issue_comment_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/issues/comments{/number}","contents_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/contents/{+path}","compare_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/merges","archive_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/downloads","issues_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/issues{/number}","pulls_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls{/number}","milestones_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/milestones{/number}","notifications_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/labels{/name}","releases_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/releases{/id}","deployments_url":"https://api.github.com/repos/Innoxia/liliths-throne-public/deployments","created_at":"2017-07-28T21:51:29Z","updated_at":"2018-10-23T23:01:23Z","pushed_at":"2018-10-24T06:33:22Z","git_url":"git://github.com/Innoxia/liliths-throne-public.git","ssh_url":"git@github.com:Innoxia/liliths-throne-public.git","clone_url":"https://github.com/Innoxia/liliths-throne-public.git","svn_url":"https://github.com/Innoxia/liliths-throne-public","homepage":"","size":62593,"stargazers_count":79,"watchers_count":79,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":111,"mirror_url":null,"archived":false,"open_issues_count":421,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":111,"open_issues":421,"watchers":79,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/949"},"html":{"href":"https://github.com/Innoxia/liliths-throne-public/pull/949"},"issue":{"href":"https://api.github.com/repos/Innoxia/liliths-throne-public/issues/949"},"comments":{"href":"https://api.github.com/repos/Innoxia/liliths-throne-public/issues/949/comments"},"review_comments":{"href":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/949/comments"},"review_comment":{"href":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Innoxia/liliths-throne-public/pulls/949/commits"},"statuses":{"href":"https://api.github.com/repos/Innoxia/liliths-throne-public/statuses/6d505898fab5663233ff284d2346fe10439da898"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AlacoGit"}}