{"action":"closed","number":30,"pull_request":{"url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls/30","id":48324329,"html_url":"https://github.com/matrix-org/matrix-js-sdk/pull/30","diff_url":"https://github.com/matrix-org/matrix-js-sdk/pull/30.diff","patch_url":"https://github.com/matrix-org/matrix-js-sdk/pull/30.patch","issue_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues/30","number":30,"state":"closed","locked":false,"title":"Change calculating display names from O(n^2) to O(n)","user":{"login":"Kegsay","id":7190048,"avatar_url":"https://avatars.githubusercontent.com/u/7190048?v=3","gravatar_id":"","url":"https://api.github.com/users/Kegsay","html_url":"https://github.com/Kegsay","followers_url":"https://api.github.com/users/Kegsay/followers","following_url":"https://api.github.com/users/Kegsay/following{/other_user}","gists_url":"https://api.github.com/users/Kegsay/gists{/gist_id}","starred_url":"https://api.github.com/users/Kegsay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kegsay/subscriptions","organizations_url":"https://api.github.com/users/Kegsay/orgs","repos_url":"https://api.github.com/users/Kegsay/repos","events_url":"https://api.github.com/users/Kegsay/events{/privacy}","received_events_url":"https://api.github.com/users/Kegsay/received_events","type":"User","site_admin":false},"body":"Reduces initial sync times from ~30s to ~1s on accounts with heavily\r\npopulated rooms.\r\n\r\nThe problem was that f.e. RoomMember it would try to calculate the\r\ndisplay name, which involved looping each RoomMember to get their\r\ndisplay name to check for disambiguation. We now cache display names\r\nto user IDs so we don't need to loop every member when disambiguating.\r\n\r\nUpdated tests.","created_at":"2015-10-21T12:28:59Z","updated_at":"2015-10-21T12:47:54Z","closed_at":"2015-10-21T12:47:54Z","merged_at":"2015-10-21T12:47:54Z","merge_commit_sha":"89dc0e54821e5dac91911a315f3e7aa7b845cb73","assignee":{"login":"Kegsay","id":7190048,"avatar_url":"https://avatars.githubusercontent.com/u/7190048?v=3","gravatar_id":"","url":"https://api.github.com/users/Kegsay","html_url":"https://github.com/Kegsay","followers_url":"https://api.github.com/users/Kegsay/followers","following_url":"https://api.github.com/users/Kegsay/following{/other_user}","gists_url":"https://api.github.com/users/Kegsay/gists{/gist_id}","starred_url":"https://api.github.com/users/Kegsay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kegsay/subscriptions","organizations_url":"https://api.github.com/users/Kegsay/orgs","repos_url":"https://api.github.com/users/Kegsay/repos","events_url":"https://api.github.com/users/Kegsay/events{/privacy}","received_events_url":"https://api.github.com/users/Kegsay/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls/30/commits","review_comments_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls/30/comments","review_comment_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues/30/comments","statuses_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/statuses/5888c8a56c4dcf7bf3786ab04ddbc7ab1334aea6","head":{"label":"matrix-org:set-state-events-perf","ref":"set-state-events-perf","sha":"5888c8a56c4dcf7bf3786ab04ddbc7ab1334aea6","user":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":31670053,"name":"matrix-js-sdk","full_name":"matrix-org/matrix-js-sdk","owner":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/matrix-js-sdk","description":"Matrix Client-Server SDK for JavaScript","fork":false,"url":"https://api.github.com/repos/matrix-org/matrix-js-sdk","forks_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/forks","keys_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/teams","hooks_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/events","assignees_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/tags","blobs_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/languages","stargazers_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/subscription","commits_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/merges","archive_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/downloads","issues_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/releases{/id}","created_at":"2015-03-04T17:28:51Z","updated_at":"2015-09-10T22:47:10Z","pushed_at":"2015-10-21T12:47:54Z","git_url":"git://github.com/matrix-org/matrix-js-sdk.git","ssh_url":"git@github.com:matrix-org/matrix-js-sdk.git","clone_url":"https://github.com/matrix-org/matrix-js-sdk.git","svn_url":"https://github.com/matrix-org/matrix-js-sdk","homepage":"","size":2503,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":12,"default_branch":"master"}},"base":{"label":"matrix-org:develop","ref":"develop","sha":"d7c63e3487e89c3d44d631eb896327e95fa107d5","user":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"repo":{"id":31670053,"name":"matrix-js-sdk","full_name":"matrix-org/matrix-js-sdk","owner":{"login":"matrix-org","id":8418310,"avatar_url":"https://avatars.githubusercontent.com/u/8418310?v=3","gravatar_id":"","url":"https://api.github.com/users/matrix-org","html_url":"https://github.com/matrix-org","followers_url":"https://api.github.com/users/matrix-org/followers","following_url":"https://api.github.com/users/matrix-org/following{/other_user}","gists_url":"https://api.github.com/users/matrix-org/gists{/gist_id}","starred_url":"https://api.github.com/users/matrix-org/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrix-org/subscriptions","organizations_url":"https://api.github.com/users/matrix-org/orgs","repos_url":"https://api.github.com/users/matrix-org/repos","events_url":"https://api.github.com/users/matrix-org/events{/privacy}","received_events_url":"https://api.github.com/users/matrix-org/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/matrix-org/matrix-js-sdk","description":"Matrix Client-Server SDK for JavaScript","fork":false,"url":"https://api.github.com/repos/matrix-org/matrix-js-sdk","forks_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/forks","keys_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/teams","hooks_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/hooks","issue_events_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/events","assignees_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/tags","blobs_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/languages","stargazers_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/stargazers","contributors_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/contributors","subscribers_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/subscribers","subscription_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/subscription","commits_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/merges","archive_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/downloads","issues_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/labels{/name}","releases_url":"https://api.github.com/repos/matrix-org/matrix-js-sdk/releases{/id}","created_at":"2015-03-04T17:28:51Z","updated_at":"2015-09-10T22:47:10Z","pushed_at":"2015-10-21T12:47:54Z","git_url":"git://github.com/matrix-org/matrix-js-sdk.git","ssh_url":"git@github.com:matrix-org/matrix-js-sdk.git","clone_url":"https://github.com/matrix-org/matrix-js-sdk.git","svn_url":"https://github.com/matrix-org/matrix-js-sdk","homepage":"","size":2503,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":4,"forks":7,"open_issues":4,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls/30"},"html":{"href":"https://github.com/matrix-org/matrix-js-sdk/pull/30"},"issue":{"href":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues/30"},"comments":{"href":"https://api.github.com/repos/matrix-org/matrix-js-sdk/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matrix-org/matrix-js-sdk/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/matrix-org/matrix-js-sdk/statuses/5888c8a56c4dcf7bf3786ab04ddbc7ab1334aea6"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"Kegsay","id":7190048,"avatar_url":"https://avatars.githubusercontent.com/u/7190048?v=3","gravatar_id":"","url":"https://api.github.com/users/Kegsay","html_url":"https://github.com/Kegsay","followers_url":"https://api.github.com/users/Kegsay/followers","following_url":"https://api.github.com/users/Kegsay/following{/other_user}","gists_url":"https://api.github.com/users/Kegsay/gists{/gist_id}","starred_url":"https://api.github.com/users/Kegsay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kegsay/subscriptions","organizations_url":"https://api.github.com/users/Kegsay/orgs","repos_url":"https://api.github.com/users/Kegsay/repos","events_url":"https://api.github.com/users/Kegsay/events{/privacy}","received_events_url":"https://api.github.com/users/Kegsay/received_events","type":"User","site_admin":false},"comments":1,"review_comments":2,"commits":3,"additions":47,"deletions":10,"changed_files":3}}