{"action":"created","issue":{"url":"https://api.github.com/repos/18F/tock/issues/182","labels_url":"https://api.github.com/repos/18F/tock/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/18F/tock/issues/182/comments","events_url":"https://api.github.com/repos/18F/tock/issues/182/events","html_url":"https://github.com/18F/tock/pull/182","id":88077712,"number":182,"title":"Eager load timecards","user":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-13T22:43:48Z","updated_at":"2015-06-15T20:05:29Z","closed_at":"2015-06-15T19:51:42Z","pull_request":{"url":"https://api.github.com/repos/18F/tock/pulls/182","html_url":"https://github.com/18F/tock/pull/182","diff_url":"https://github.com/18F/tock/pull/182.diff","patch_url":"https://github.com/18F/tock/pull/182.patch"},"body":"Eagerly load timecard related rows.\r\n\r\nCurrently, hitting the timecard views executes 5n+1 queries: one query\r\nto load the relevant timecards, and five additional queries to load\r\nrelated rows (projects, reporting periods, etc.) for each matching\r\ntimecard. This may be related to the slowness reported in #179. This\r\npatch uses the `select_related` method to tell Django that related\r\nobjects should be loaded in the initial query via joins."},"comment":{"url":"https://api.github.com/repos/18F/tock/issues/comments/112191617","html_url":"https://github.com/18F/tock/pull/182#issuecomment-112191617","issue_url":"https://api.github.com/repos/18F/tock/issues/182","id":112191617,"user":{"login":"jmcarp","id":1633460,"avatar_url":"https://avatars.githubusercontent.com/u/1633460?v=3","gravatar_id":"","url":"https://api.github.com/users/jmcarp","html_url":"https://github.com/jmcarp","followers_url":"https://api.github.com/users/jmcarp/followers","following_url":"https://api.github.com/users/jmcarp/following{/other_user}","gists_url":"https://api.github.com/users/jmcarp/gists{/gist_id}","starred_url":"https://api.github.com/users/jmcarp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmcarp/subscriptions","organizations_url":"https://api.github.com/users/jmcarp/orgs","repos_url":"https://api.github.com/users/jmcarp/repos","events_url":"https://api.github.com/users/jmcarp/events{/privacy}","received_events_url":"https://api.github.com/users/jmcarp/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T20:05:29Z","updated_at":"2015-06-15T20:05:29Z","body":"@shawnbot I don't think so--should I?"}}