{"action":"closed","number":3262,"pull_request":{"url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/3262","id":226261660,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MjYxNjYw","html_url":"https://github.com/DestinyItemManager/DIM/pull/3262","diff_url":"https://github.com/DestinyItemManager/DIM/pull/3262.diff","patch_url":"https://github.com/DestinyItemManager/DIM/pull/3262.patch","issue_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/3262","number":3262,"state":"closed","locked":false,"title":"Optimize DTR fetching","user":{"login":"bhollis","id":313208,"node_id":"MDQ6VXNlcjMxMzIwOA==","avatar_url":"https://avatars0.githubusercontent.com/u/313208?v=4","gravatar_id":"","url":"https://api.github.com/users/bhollis","html_url":"https://github.com/bhollis","followers_url":"https://api.github.com/users/bhollis/followers","following_url":"https://api.github.com/users/bhollis/following{/other_user}","gists_url":"https://api.github.com/users/bhollis/gists{/gist_id}","starred_url":"https://api.github.com/users/bhollis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhollis/subscriptions","organizations_url":"https://api.github.com/users/bhollis/orgs","repos_url":"https://api.github.com/users/bhollis/repos","events_url":"https://api.github.com/users/bhollis/events{/privacy}","received_events_url":"https://api.github.com/users/bhollis/received_events","type":"User","site_admin":false},"body":"With a batch size of 10, I was requiring 48 serial requests to DTR to load ratings, which took forever. This PR optimizes a few things:\r\n\r\n1. Bump the batch size to 100.\r\n2. Load all the batches in parallel, instead of serially.\r\n3. Optimize the calculation of which items are new.\r\n4. Include \"roll\" in whether an item is new, not just item hash.\r\n5. Skip doing expensive work when the response is empty.","created_at":"2018-10-27T01:52:47Z","updated_at":"2018-10-29T00:00:03Z","closed_at":"2018-10-29T00:00:03Z","merged_at":"2018-10-29T00:00:03Z","merge_commit_sha":"628d96974b6d4581013f38d177adf941daf6d3c0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":626732662,"node_id":"MDU6TGFiZWw2MjY3MzI2NjI=","url":"https://api.github.com/repos/DestinyItemManager/DIM/labels/Feature:%20Item%20Reviews","name":"Feature: Item Reviews","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/3262/commits","review_comments_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/3262/comments","review_comment_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/3262/comments","statuses_url":"https://api.github.com/repos/DestinyItemManager/DIM/statuses/7914b2cc7b7448bb068cf40e95284ebf0be67893","head":{"label":"DestinyItemManager:optimize-dtr","ref":"optimize-dtr","sha":"7914b2cc7b7448bb068cf40e95284ebf0be67893","user":{"login":"DestinyItemManager","id":12777189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzc3MTg5","avatar_url":"https://avatars3.githubusercontent.com/u/12777189?v=4","gravatar_id":"","url":"https://api.github.com/users/DestinyItemManager","html_url":"https://github.com/DestinyItemManager","followers_url":"https://api.github.com/users/DestinyItemManager/followers","following_url":"https://api.github.com/users/DestinyItemManager/following{/other_user}","gists_url":"https://api.github.com/users/DestinyItemManager/gists{/gist_id}","starred_url":"https://api.github.com/users/DestinyItemManager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DestinyItemManager/subscriptions","organizations_url":"https://api.github.com/users/DestinyItemManager/orgs","repos_url":"https://api.github.com/users/DestinyItemManager/repos","events_url":"https://api.github.com/users/DestinyItemManager/events{/privacy}","received_events_url":"https://api.github.com/users/DestinyItemManager/received_events","type":"Organization","site_admin":false},"repo":{"id":31681575,"node_id":"MDEwOlJlcG9zaXRvcnkzMTY4MTU3NQ==","name":"DIM","full_name":"DestinyItemManager/DIM","private":false,"owner":{"login":"DestinyItemManager","id":12777189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzc3MTg5","avatar_url":"https://avatars3.githubusercontent.com/u/12777189?v=4","gravatar_id":"","url":"https://api.github.com/users/DestinyItemManager","html_url":"https://github.com/DestinyItemManager","followers_url":"https://api.github.com/users/DestinyItemManager/followers","following_url":"https://api.github.com/users/DestinyItemManager/following{/other_user}","gists_url":"https://api.github.com/users/DestinyItemManager/gists{/gist_id}","starred_url":"https://api.github.com/users/DestinyItemManager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DestinyItemManager/subscriptions","organizations_url":"https://api.github.com/users/DestinyItemManager/orgs","repos_url":"https://api.github.com/users/DestinyItemManager/repos","events_url":"https://api.github.com/users/DestinyItemManager/events{/privacy}","received_events_url":"https://api.github.com/users/DestinyItemManager/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DestinyItemManager/DIM","description":"Destiny Item Manager","fork":false,"url":"https://api.github.com/repos/DestinyItemManager/DIM","forks_url":"https://api.github.com/repos/DestinyItemManager/DIM/forks","keys_url":"https://api.github.com/repos/DestinyItemManager/DIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DestinyItemManager/DIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DestinyItemManager/DIM/teams","hooks_url":"https://api.github.com/repos/DestinyItemManager/DIM/hooks","issue_events_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/events{/number}","events_url":"https://api.github.com/repos/DestinyItemManager/DIM/events","assignees_url":"https://api.github.com/repos/DestinyItemManager/DIM/assignees{/user}","branches_url":"https://api.github.com/repos/DestinyItemManager/DIM/branches{/branch}","tags_url":"https://api.github.com/repos/DestinyItemManager/DIM/tags","blobs_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DestinyItemManager/DIM/statuses/{sha}","languages_url":"https://api.github.com/repos/DestinyItemManager/DIM/languages","stargazers_url":"https://api.github.com/repos/DestinyItemManager/DIM/stargazers","contributors_url":"https://api.github.com/repos/DestinyItemManager/DIM/contributors","subscribers_url":"https://api.github.com/repos/DestinyItemManager/DIM/subscribers","subscription_url":"https://api.github.com/repos/DestinyItemManager/DIM/subscription","commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/DestinyItemManager/DIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/DestinyItemManager/DIM/contents/{+path}","compare_url":"https://api.github.com/repos/DestinyItemManager/DIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DestinyItemManager/DIM/merges","archive_url":"https://api.github.com/repos/DestinyItemManager/DIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DestinyItemManager/DIM/downloads","issues_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues{/number}","pulls_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls{/number}","milestones_url":"https://api.github.com/repos/DestinyItemManager/DIM/milestones{/number}","notifications_url":"https://api.github.com/repos/DestinyItemManager/DIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DestinyItemManager/DIM/labels{/name}","releases_url":"https://api.github.com/repos/DestinyItemManager/DIM/releases{/id}","deployments_url":"https://api.github.com/repos/DestinyItemManager/DIM/deployments","created_at":"2015-03-04T21:46:50Z","updated_at":"2018-10-28T23:59:19Z","pushed_at":"2018-10-29T00:00:03Z","git_url":"git://github.com/DestinyItemManager/DIM.git","ssh_url":"git@github.com:DestinyItemManager/DIM.git","clone_url":"https://github.com/DestinyItemManager/DIM.git","svn_url":"https://github.com/DestinyItemManager/DIM","homepage":"https://destinyitemmanager.com","size":271222,"stargazers_count":750,"watchers_count":750,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":269,"mirror_url":null,"archived":false,"open_issues_count":78,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":269,"open_issues":78,"watchers":750,"default_branch":"master"}},"base":{"label":"DestinyItemManager:master","ref":"master","sha":"51ab3d5ca9e34584337f68de2ddfc2caa66269c8","user":{"login":"DestinyItemManager","id":12777189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzc3MTg5","avatar_url":"https://avatars3.githubusercontent.com/u/12777189?v=4","gravatar_id":"","url":"https://api.github.com/users/DestinyItemManager","html_url":"https://github.com/DestinyItemManager","followers_url":"https://api.github.com/users/DestinyItemManager/followers","following_url":"https://api.github.com/users/DestinyItemManager/following{/other_user}","gists_url":"https://api.github.com/users/DestinyItemManager/gists{/gist_id}","starred_url":"https://api.github.com/users/DestinyItemManager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DestinyItemManager/subscriptions","organizations_url":"https://api.github.com/users/DestinyItemManager/orgs","repos_url":"https://api.github.com/users/DestinyItemManager/repos","events_url":"https://api.github.com/users/DestinyItemManager/events{/privacy}","received_events_url":"https://api.github.com/users/DestinyItemManager/received_events","type":"Organization","site_admin":false},"repo":{"id":31681575,"node_id":"MDEwOlJlcG9zaXRvcnkzMTY4MTU3NQ==","name":"DIM","full_name":"DestinyItemManager/DIM","private":false,"owner":{"login":"DestinyItemManager","id":12777189,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNzc3MTg5","avatar_url":"https://avatars3.githubusercontent.com/u/12777189?v=4","gravatar_id":"","url":"https://api.github.com/users/DestinyItemManager","html_url":"https://github.com/DestinyItemManager","followers_url":"https://api.github.com/users/DestinyItemManager/followers","following_url":"https://api.github.com/users/DestinyItemManager/following{/other_user}","gists_url":"https://api.github.com/users/DestinyItemManager/gists{/gist_id}","starred_url":"https://api.github.com/users/DestinyItemManager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DestinyItemManager/subscriptions","organizations_url":"https://api.github.com/users/DestinyItemManager/orgs","repos_url":"https://api.github.com/users/DestinyItemManager/repos","events_url":"https://api.github.com/users/DestinyItemManager/events{/privacy}","received_events_url":"https://api.github.com/users/DestinyItemManager/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DestinyItemManager/DIM","description":"Destiny Item Manager","fork":false,"url":"https://api.github.com/repos/DestinyItemManager/DIM","forks_url":"https://api.github.com/repos/DestinyItemManager/DIM/forks","keys_url":"https://api.github.com/repos/DestinyItemManager/DIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DestinyItemManager/DIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DestinyItemManager/DIM/teams","hooks_url":"https://api.github.com/repos/DestinyItemManager/DIM/hooks","issue_events_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/events{/number}","events_url":"https://api.github.com/repos/DestinyItemManager/DIM/events","assignees_url":"https://api.github.com/repos/DestinyItemManager/DIM/assignees{/user}","branches_url":"https://api.github.com/repos/DestinyItemManager/DIM/branches{/branch}","tags_url":"https://api.github.com/repos/DestinyItemManager/DIM/tags","blobs_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DestinyItemManager/DIM/statuses/{sha}","languages_url":"https://api.github.com/repos/DestinyItemManager/DIM/languages","stargazers_url":"https://api.github.com/repos/DestinyItemManager/DIM/stargazers","contributors_url":"https://api.github.com/repos/DestinyItemManager/DIM/contributors","subscribers_url":"https://api.github.com/repos/DestinyItemManager/DIM/subscribers","subscription_url":"https://api.github.com/repos/DestinyItemManager/DIM/subscription","commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/DestinyItemManager/DIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/DestinyItemManager/DIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/DestinyItemManager/DIM/contents/{+path}","compare_url":"https://api.github.com/repos/DestinyItemManager/DIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DestinyItemManager/DIM/merges","archive_url":"https://api.github.com/repos/DestinyItemManager/DIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DestinyItemManager/DIM/downloads","issues_url":"https://api.github.com/repos/DestinyItemManager/DIM/issues{/number}","pulls_url":"https://api.github.com/repos/DestinyItemManager/DIM/pulls{/number}","milestones_url":"https://api.github.com/repos/DestinyItemManager/DIM/milestones{/number}","notifications_url":"https://api.github.com/repos/DestinyItemManager/DIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DestinyItemManager/DIM/labels{/name}","releases_url":"https://api.github.com/repos/DestinyItemManager/DIM/releases{/id}","deployments_url":"https://api.github.com/repos/DestinyItemManager/DIM/deployments","created_at":"2015-03-04T21:46:50Z","updated_at":"2018-10-28T23:59:19Z","pushed_at":"2018-10-29T00:00:03Z","git_url":"git://github.com/DestinyItemManager/DIM.git","ssh_url":"git@github.com:DestinyItemManager/DIM.git","clone_url":"https://github.com/DestinyItemManager/DIM.git","svn_url":"https://github.com/DestinyItemManager/DIM","homepage":"https://destinyitemmanager.com","size":271222,"stargazers_count":750,"watchers_count":750,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":269,"mirror_url":null,"archived":false,"open_issues_count":78,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":269,"open_issues":78,"watchers":750,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/3262"},"html":{"href":"https://github.com/DestinyItemManager/DIM/pull/3262"},"issue":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/issues/3262"},"comments":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/issues/3262/comments"},"review_comments":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/3262/comments"},"review_comment":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/pulls/3262/commits"},"statuses":{"href":"https://api.github.com/repos/DestinyItemManager/DIM/statuses/7914b2cc7b7448bb068cf40e95284ebf0be67893"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"bhollis","id":313208,"node_id":"MDQ6VXNlcjMxMzIwOA==","avatar_url":"https://avatars0.githubusercontent.com/u/313208?v=4","gravatar_id":"","url":"https://api.github.com/users/bhollis","html_url":"https://github.com/bhollis","followers_url":"https://api.github.com/users/bhollis/followers","following_url":"https://api.github.com/users/bhollis/following{/other_user}","gists_url":"https://api.github.com/users/bhollis/gists{/gist_id}","starred_url":"https://api.github.com/users/bhollis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhollis/subscriptions","organizations_url":"https://api.github.com/users/bhollis/orgs","repos_url":"https://api.github.com/users/bhollis/repos","events_url":"https://api.github.com/users/bhollis/events{/privacy}","received_events_url":"https://api.github.com/users/bhollis/received_events","type":"User","site_admin":false},"comments":5,"review_comments":1,"maintainer_can_modify":false,"commits":3,"additions":29,"deletions":28,"changed_files":5}}
{"actor":{"display_login":"bhollis"}}