{"action":"opened","number":146,"pull_request":{"url":"https://api.github.com/repos/twinlabs/forum/pulls/146","id":30818207,"html_url":"https://github.com/twinlabs/forum/pull/146","diff_url":"https://github.com/twinlabs/forum/pull/146.diff","patch_url":"https://github.com/twinlabs/forum/pull/146.patch","issue_url":"https://api.github.com/repos/twinlabs/forum/issues/146","number":146,"state":"open","locked":false,"title":"topic listing page optimization","user":{"login":"nchase","id":197309,"avatar_url":"https://avatars.githubusercontent.com/u/197309?v=3","gravatar_id":"","url":"https://api.github.com/users/nchase","html_url":"https://github.com/nchase","followers_url":"https://api.github.com/users/nchase/followers","following_url":"https://api.github.com/users/nchase/following{/other_user}","gists_url":"https://api.github.com/users/nchase/gists{/gist_id}","starred_url":"https://api.github.com/users/nchase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nchase/subscriptions","organizations_url":"https://api.github.com/users/nchase/orgs","repos_url":"https://api.github.com/users/nchase/repos","events_url":"https://api.github.com/users/nchase/events{/privacy}","received_events_url":"https://api.github.com/users/nchase/received_events","type":"User","site_admin":false},"body":"1. first commit is actually a rider. it ensures that we don't do too many lookups for 'thread last visited' info. this used to happen on every request, including asset requests. now it no longer happens for requests that are obviously asset requests. this change affects all pages/requests.\r\n2. built up a query that will return the data we want on the \"topics\" page/logged-in index. it's a bit of a monster (many subqueries) but it's an order of magnitude faster than the query that sequelize was generating. fixes #144. in the future we _might_ want to do multiple individual queries and then combine them all after they've all come back instead of putting a bunch of subqueries here. that would be nice to consider particularly if it's faster than what this changeset introduces.","created_at":"2015-03-10T02:35:33Z","updated_at":"2015-03-10T02:35:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e689129523dbfb4f7299a97d6d4359e508e1db4f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twinlabs/forum/pulls/146/commits","review_comments_url":"https://api.github.com/repos/twinlabs/forum/pulls/146/comments","review_comment_url":"https://api.github.com/repos/twinlabs/forum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twinlabs/forum/issues/146/comments","statuses_url":"https://api.github.com/repos/twinlabs/forum/statuses/a695d49add9c174bbbf20863967c2da9e292df32","head":{"label":"twinlabs:better-queries","ref":"better-queries","sha":"a695d49add9c174bbbf20863967c2da9e292df32","user":{"login":"twinlabs","id":3818196,"avatar_url":"https://avatars.githubusercontent.com/u/3818196?v=3","gravatar_id":"","url":"https://api.github.com/users/twinlabs","html_url":"https://github.com/twinlabs","followers_url":"https://api.github.com/users/twinlabs/followers","following_url":"https://api.github.com/users/twinlabs/following{/other_user}","gists_url":"https://api.github.com/users/twinlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/twinlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twinlabs/subscriptions","organizations_url":"https://api.github.com/users/twinlabs/orgs","repos_url":"https://api.github.com/users/twinlabs/repos","events_url":"https://api.github.com/users/twinlabs/events{/privacy}","received_events_url":"https://api.github.com/users/twinlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14462036,"name":"forum","full_name":"twinlabs/forum","owner":{"login":"twinlabs","id":3818196,"avatar_url":"https://avatars.githubusercontent.com/u/3818196?v=3","gravatar_id":"","url":"https://api.github.com/users/twinlabs","html_url":"https://github.com/twinlabs","followers_url":"https://api.github.com/users/twinlabs/followers","following_url":"https://api.github.com/users/twinlabs/following{/other_user}","gists_url":"https://api.github.com/users/twinlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/twinlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twinlabs/subscriptions","organizations_url":"https://api.github.com/users/twinlabs/orgs","repos_url":"https://api.github.com/users/twinlabs/repos","events_url":"https://api.github.com/users/twinlabs/events{/privacy}","received_events_url":"https://api.github.com/users/twinlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twinlabs/forum","description":"","fork":false,"url":"https://api.github.com/repos/twinlabs/forum","forks_url":"https://api.github.com/repos/twinlabs/forum/forks","keys_url":"https://api.github.com/repos/twinlabs/forum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twinlabs/forum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twinlabs/forum/teams","hooks_url":"https://api.github.com/repos/twinlabs/forum/hooks","issue_events_url":"https://api.github.com/repos/twinlabs/forum/issues/events{/number}","events_url":"https://api.github.com/repos/twinlabs/forum/events","assignees_url":"https://api.github.com/repos/twinlabs/forum/assignees{/user}","branches_url":"https://api.github.com/repos/twinlabs/forum/branches{/branch}","tags_url":"https://api.github.com/repos/twinlabs/forum/tags","blobs_url":"https://api.github.com/repos/twinlabs/forum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twinlabs/forum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twinlabs/forum/git/refs{/sha}","trees_url":"https://api.github.com/repos/twinlabs/forum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twinlabs/forum/statuses/{sha}","languages_url":"https://api.github.com/repos/twinlabs/forum/languages","stargazers_url":"https://api.github.com/repos/twinlabs/forum/stargazers","contributors_url":"https://api.github.com/repos/twinlabs/forum/contributors","subscribers_url":"https://api.github.com/repos/twinlabs/forum/subscribers","subscription_url":"https://api.github.com/repos/twinlabs/forum/subscription","commits_url":"https://api.github.com/repos/twinlabs/forum/commits{/sha}","git_commits_url":"https://api.github.com/repos/twinlabs/forum/git/commits{/sha}","comments_url":"https://api.github.com/repos/twinlabs/forum/comments{/number}","issue_comment_url":"https://api.github.com/repos/twinlabs/forum/issues/comments{/number}","contents_url":"https://api.github.com/repos/twinlabs/forum/contents/{+path}","compare_url":"https://api.github.com/repos/twinlabs/forum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twinlabs/forum/merges","archive_url":"https://api.github.com/repos/twinlabs/forum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twinlabs/forum/downloads","issues_url":"https://api.github.com/repos/twinlabs/forum/issues{/number}","pulls_url":"https://api.github.com/repos/twinlabs/forum/pulls{/number}","milestones_url":"https://api.github.com/repos/twinlabs/forum/milestones{/number}","notifications_url":"https://api.github.com/repos/twinlabs/forum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twinlabs/forum/labels{/name}","releases_url":"https://api.github.com/repos/twinlabs/forum/releases{/id}","created_at":"2013-11-17T05:56:44Z","updated_at":"2015-03-09T01:16:34Z","pushed_at":"2015-03-09T20:18:48Z","git_url":"git://github.com/twinlabs/forum.git","ssh_url":"git@github.com:twinlabs/forum.git","clone_url":"https://github.com/twinlabs/forum.git","svn_url":"https://github.com/twinlabs/forum","homepage":null,"size":6698,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":15,"forks":1,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"twinlabs:master","ref":"master","sha":"67b8718d1ef81041a6b3c6e256bdc94eccfdebe3","user":{"login":"twinlabs","id":3818196,"avatar_url":"https://avatars.githubusercontent.com/u/3818196?v=3","gravatar_id":"","url":"https://api.github.com/users/twinlabs","html_url":"https://github.com/twinlabs","followers_url":"https://api.github.com/users/twinlabs/followers","following_url":"https://api.github.com/users/twinlabs/following{/other_user}","gists_url":"https://api.github.com/users/twinlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/twinlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twinlabs/subscriptions","organizations_url":"https://api.github.com/users/twinlabs/orgs","repos_url":"https://api.github.com/users/twinlabs/repos","events_url":"https://api.github.com/users/twinlabs/events{/privacy}","received_events_url":"https://api.github.com/users/twinlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14462036,"name":"forum","full_name":"twinlabs/forum","owner":{"login":"twinlabs","id":3818196,"avatar_url":"https://avatars.githubusercontent.com/u/3818196?v=3","gravatar_id":"","url":"https://api.github.com/users/twinlabs","html_url":"https://github.com/twinlabs","followers_url":"https://api.github.com/users/twinlabs/followers","following_url":"https://api.github.com/users/twinlabs/following{/other_user}","gists_url":"https://api.github.com/users/twinlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/twinlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twinlabs/subscriptions","organizations_url":"https://api.github.com/users/twinlabs/orgs","repos_url":"https://api.github.com/users/twinlabs/repos","events_url":"https://api.github.com/users/twinlabs/events{/privacy}","received_events_url":"https://api.github.com/users/twinlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twinlabs/forum","description":"","fork":false,"url":"https://api.github.com/repos/twinlabs/forum","forks_url":"https://api.github.com/repos/twinlabs/forum/forks","keys_url":"https://api.github.com/repos/twinlabs/forum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twinlabs/forum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twinlabs/forum/teams","hooks_url":"https://api.github.com/repos/twinlabs/forum/hooks","issue_events_url":"https://api.github.com/repos/twinlabs/forum/issues/events{/number}","events_url":"https://api.github.com/repos/twinlabs/forum/events","assignees_url":"https://api.github.com/repos/twinlabs/forum/assignees{/user}","branches_url":"https://api.github.com/repos/twinlabs/forum/branches{/branch}","tags_url":"https://api.github.com/repos/twinlabs/forum/tags","blobs_url":"https://api.github.com/repos/twinlabs/forum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twinlabs/forum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twinlabs/forum/git/refs{/sha}","trees_url":"https://api.github.com/repos/twinlabs/forum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twinlabs/forum/statuses/{sha}","languages_url":"https://api.github.com/repos/twinlabs/forum/languages","stargazers_url":"https://api.github.com/repos/twinlabs/forum/stargazers","contributors_url":"https://api.github.com/repos/twinlabs/forum/contributors","subscribers_url":"https://api.github.com/repos/twinlabs/forum/subscribers","subscription_url":"https://api.github.com/repos/twinlabs/forum/subscription","commits_url":"https://api.github.com/repos/twinlabs/forum/commits{/sha}","git_commits_url":"https://api.github.com/repos/twinlabs/forum/git/commits{/sha}","comments_url":"https://api.github.com/repos/twinlabs/forum/comments{/number}","issue_comment_url":"https://api.github.com/repos/twinlabs/forum/issues/comments{/number}","contents_url":"https://api.github.com/repos/twinlabs/forum/contents/{+path}","compare_url":"https://api.github.com/repos/twinlabs/forum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twinlabs/forum/merges","archive_url":"https://api.github.com/repos/twinlabs/forum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twinlabs/forum/downloads","issues_url":"https://api.github.com/repos/twinlabs/forum/issues{/number}","pulls_url":"https://api.github.com/repos/twinlabs/forum/pulls{/number}","milestones_url":"https://api.github.com/repos/twinlabs/forum/milestones{/number}","notifications_url":"https://api.github.com/repos/twinlabs/forum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twinlabs/forum/labels{/name}","releases_url":"https://api.github.com/repos/twinlabs/forum/releases{/id}","created_at":"2013-11-17T05:56:44Z","updated_at":"2015-03-09T01:16:34Z","pushed_at":"2015-03-09T20:18:48Z","git_url":"git://github.com/twinlabs/forum.git","ssh_url":"git@github.com:twinlabs/forum.git","clone_url":"https://github.com/twinlabs/forum.git","svn_url":"https://github.com/twinlabs/forum","homepage":null,"size":6698,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":15,"forks":1,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twinlabs/forum/pulls/146"},"html":{"href":"https://github.com/twinlabs/forum/pull/146"},"issue":{"href":"https://api.github.com/repos/twinlabs/forum/issues/146"},"comments":{"href":"https://api.github.com/repos/twinlabs/forum/issues/146/comments"},"review_comments":{"href":"https://api.github.com/repos/twinlabs/forum/pulls/146/comments"},"review_comment":{"href":"https://api.github.com/repos/twinlabs/forum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twinlabs/forum/pulls/146/commits"},"statuses":{"href":"https://api.github.com/repos/twinlabs/forum/statuses/a695d49add9c174bbbf20863967c2da9e292df32"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":33,"deletions":28,"changed_files":4}}