{"action":"closed","number":204,"pull_request":{"url":"https://api.github.com/repos/edx/cs_comments_service/pulls/204","id":82424063,"html_url":"https://github.com/edx/cs_comments_service/pull/204","diff_url":"https://github.com/edx/cs_comments_service/pull/204.diff","patch_url":"https://github.com/edx/cs_comments_service/pull/204.patch","issue_url":"https://api.github.com/repos/edx/cs_comments_service/issues/204","number":204,"state":"closed","locked":false,"title":"Plucking instead of mapping.","user":{"login":"tobz","id":222615,"avatar_url":"https://avatars.githubusercontent.com/u/222615?v=3","gravatar_id":"","url":"https://api.github.com/users/tobz","html_url":"https://github.com/tobz","followers_url":"https://api.github.com/users/tobz/followers","following_url":"https://api.github.com/users/tobz/following{/other_user}","gists_url":"https://api.github.com/users/tobz/gists{/gist_id}","starred_url":"https://api.github.com/users/tobz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobz/subscriptions","organizations_url":"https://api.github.com/users/tobz/orgs","repos_url":"https://api.github.com/users/tobz/repos","events_url":"https://api.github.com/users/tobz/events{/privacy}","received_events_url":"https://api.github.com/users/tobz/received_events","type":"User","site_admin":false},"body":"Use pluck instead of map for upvoted/downvoted IDs.\r\n\r\nMapping involves doing the projection locally, whereas plucking will ask MongoDB to do the projection for us.  This is the difference between sending the whole document back and sending back the ObjectId itself.\r\n\r\nMultiplied against hundreds or thousands of documents, mapping can really add up, so plucking should really help these 99%'ile cases.","created_at":"2016-08-23T19:16:16Z","updated_at":"2016-08-24T14:20:59Z","closed_at":"2016-08-24T14:20:59Z","merged_at":"2016-08-24T14:20:59Z","merge_commit_sha":"7cc9a131a2bf1f57b01c5c06677df60ecfd98b68","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/edx/cs_comments_service/pulls/204/commits","review_comments_url":"https://api.github.com/repos/edx/cs_comments_service/pulls/204/comments","review_comment_url":"https://api.github.com/repos/edx/cs_comments_service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/cs_comments_service/issues/204/comments","statuses_url":"https://api.github.com/repos/edx/cs_comments_service/statuses/e94358798d85b355865ce21a04cdead90fa6f7ed","head":{"label":"edx:perf/pluck-not-map-voting-ids","ref":"perf/pluck-not-map-voting-ids","sha":"e94358798d85b355865ce21a04cdead90fa6f7ed","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":4732120,"name":"cs_comments_service","full_name":"edx/cs_comments_service","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/cs_comments_service","description":"server side of the comment service","fork":false,"url":"https://api.github.com/repos/edx/cs_comments_service","forks_url":"https://api.github.com/repos/edx/cs_comments_service/forks","keys_url":"https://api.github.com/repos/edx/cs_comments_service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/cs_comments_service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/cs_comments_service/teams","hooks_url":"https://api.github.com/repos/edx/cs_comments_service/hooks","issue_events_url":"https://api.github.com/repos/edx/cs_comments_service/issues/events{/number}","events_url":"https://api.github.com/repos/edx/cs_comments_service/events","assignees_url":"https://api.github.com/repos/edx/cs_comments_service/assignees{/user}","branches_url":"https://api.github.com/repos/edx/cs_comments_service/branches{/branch}","tags_url":"https://api.github.com/repos/edx/cs_comments_service/tags","blobs_url":"https://api.github.com/repos/edx/cs_comments_service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/cs_comments_service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/cs_comments_service/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/cs_comments_service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/cs_comments_service/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/cs_comments_service/languages","stargazers_url":"https://api.github.com/repos/edx/cs_comments_service/stargazers","contributors_url":"https://api.github.com/repos/edx/cs_comments_service/contributors","subscribers_url":"https://api.github.com/repos/edx/cs_comments_service/subscribers","subscription_url":"https://api.github.com/repos/edx/cs_comments_service/subscription","commits_url":"https://api.github.com/repos/edx/cs_comments_service/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/cs_comments_service/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/cs_comments_service/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/cs_comments_service/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/cs_comments_service/contents/{+path}","compare_url":"https://api.github.com/repos/edx/cs_comments_service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/cs_comments_service/merges","archive_url":"https://api.github.com/repos/edx/cs_comments_service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/cs_comments_service/downloads","issues_url":"https://api.github.com/repos/edx/cs_comments_service/issues{/number}","pulls_url":"https://api.github.com/repos/edx/cs_comments_service/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/cs_comments_service/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/cs_comments_service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/cs_comments_service/labels{/name}","releases_url":"https://api.github.com/repos/edx/cs_comments_service/releases{/id}","deployments_url":"https://api.github.com/repos/edx/cs_comments_service/deployments","created_at":"2012-06-20T22:12:04Z","updated_at":"2016-08-22T19:36:10Z","pushed_at":"2016-08-24T14:20:59Z","git_url":"git://github.com/edx/cs_comments_service.git","ssh_url":"git@github.com:edx/cs_comments_service.git","clone_url":"https://github.com/edx/cs_comments_service.git","svn_url":"https://github.com/edx/cs_comments_service","homepage":null,"size":1622,"stargazers_count":26,"watchers_count":26,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":8,"forks":79,"open_issues":8,"watchers":26,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"3d902ee8c456024878a875dfddd7a18ee21c8759","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":4732120,"name":"cs_comments_service","full_name":"edx/cs_comments_service","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/cs_comments_service","description":"server side of the comment service","fork":false,"url":"https://api.github.com/repos/edx/cs_comments_service","forks_url":"https://api.github.com/repos/edx/cs_comments_service/forks","keys_url":"https://api.github.com/repos/edx/cs_comments_service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/cs_comments_service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/cs_comments_service/teams","hooks_url":"https://api.github.com/repos/edx/cs_comments_service/hooks","issue_events_url":"https://api.github.com/repos/edx/cs_comments_service/issues/events{/number}","events_url":"https://api.github.com/repos/edx/cs_comments_service/events","assignees_url":"https://api.github.com/repos/edx/cs_comments_service/assignees{/user}","branches_url":"https://api.github.com/repos/edx/cs_comments_service/branches{/branch}","tags_url":"https://api.github.com/repos/edx/cs_comments_service/tags","blobs_url":"https://api.github.com/repos/edx/cs_comments_service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/cs_comments_service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/cs_comments_service/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/cs_comments_service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/cs_comments_service/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/cs_comments_service/languages","stargazers_url":"https://api.github.com/repos/edx/cs_comments_service/stargazers","contributors_url":"https://api.github.com/repos/edx/cs_comments_service/contributors","subscribers_url":"https://api.github.com/repos/edx/cs_comments_service/subscribers","subscription_url":"https://api.github.com/repos/edx/cs_comments_service/subscription","commits_url":"https://api.github.com/repos/edx/cs_comments_service/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/cs_comments_service/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/cs_comments_service/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/cs_comments_service/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/cs_comments_service/contents/{+path}","compare_url":"https://api.github.com/repos/edx/cs_comments_service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/cs_comments_service/merges","archive_url":"https://api.github.com/repos/edx/cs_comments_service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/cs_comments_service/downloads","issues_url":"https://api.github.com/repos/edx/cs_comments_service/issues{/number}","pulls_url":"https://api.github.com/repos/edx/cs_comments_service/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/cs_comments_service/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/cs_comments_service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/cs_comments_service/labels{/name}","releases_url":"https://api.github.com/repos/edx/cs_comments_service/releases{/id}","deployments_url":"https://api.github.com/repos/edx/cs_comments_service/deployments","created_at":"2012-06-20T22:12:04Z","updated_at":"2016-08-22T19:36:10Z","pushed_at":"2016-08-24T14:20:59Z","git_url":"git://github.com/edx/cs_comments_service.git","ssh_url":"git@github.com:edx/cs_comments_service.git","clone_url":"https://github.com/edx/cs_comments_service.git","svn_url":"https://github.com/edx/cs_comments_service","homepage":null,"size":1622,"stargazers_count":26,"watchers_count":26,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":8,"forks":79,"open_issues":8,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/cs_comments_service/pulls/204"},"html":{"href":"https://github.com/edx/cs_comments_service/pull/204"},"issue":{"href":"https://api.github.com/repos/edx/cs_comments_service/issues/204"},"comments":{"href":"https://api.github.com/repos/edx/cs_comments_service/issues/204/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/cs_comments_service/pulls/204/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/cs_comments_service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/cs_comments_service/pulls/204/commits"},"statuses":{"href":"https://api.github.com/repos/edx/cs_comments_service/statuses/e94358798d85b355865ce21a04cdead90fa6f7ed"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"tobz","id":222615,"avatar_url":"https://avatars.githubusercontent.com/u/222615?v=3","gravatar_id":"","url":"https://api.github.com/users/tobz","html_url":"https://github.com/tobz","followers_url":"https://api.github.com/users/tobz/followers","following_url":"https://api.github.com/users/tobz/following{/other_user}","gists_url":"https://api.github.com/users/tobz/gists{/gist_id}","starred_url":"https://api.github.com/users/tobz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobz/subscriptions","organizations_url":"https://api.github.com/users/tobz/orgs","repos_url":"https://api.github.com/users/tobz/repos","events_url":"https://api.github.com/users/tobz/events{/privacy}","received_events_url":"https://api.github.com/users/tobz/received_events","type":"User","site_admin":false},"comments":8,"review_comments":0,"commits":1,"additions":59,"deletions":3,"changed_files":4}}
{"actor":{"display_login":"tobz"}}