{"action":"opened","issue":{"url":"https://api.github.com/repos/alythobani/stay-habby/issues/3","repository_url":"https://api.github.com/repos/alythobani/stay-habby","labels_url":"https://api.github.com/repos/alythobani/stay-habby/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/alythobani/stay-habby/issues/3/comments","events_url":"https://api.github.com/repos/alythobani/stay-habby/issues/3/events","html_url":"https://github.com/alythobani/stay-habby/issues/3","id":347064082,"node_id":"MDU6SXNzdWUzNDcwNjQwODI=","number":3,"title":"Only update frequency stats for the relevant habit after certain actions","user":{"login":"alythobani","id":13757215,"node_id":"MDQ6VXNlcjEzNzU3MjE1","avatar_url":"https://avatars1.githubusercontent.com/u/13757215?v=4","gravatar_id":"","url":"https://api.github.com/users/alythobani","html_url":"https://github.com/alythobani","followers_url":"https://api.github.com/users/alythobani/followers","following_url":"https://api.github.com/users/alythobani/following{/other_user}","gists_url":"https://api.github.com/users/alythobani/gists{/gist_id}","starred_url":"https://api.github.com/users/alythobani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alythobani/subscriptions","organizations_url":"https://api.github.com/users/alythobani/orgs","repos_url":"https://api.github.com/users/alythobani/repos","events_url":"https://api.github.com/users/alythobani/events{/privacy}","received_events_url":"https://api.github.com/users/alythobani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-02T15:30:57Z","updated_at":"2018-08-02T15:30:57Z","closed_at":null,"author_association":"OWNER","body":"Right now after the user enters a new habit amount record, or suspends/resumes a habit, we query get_frequency_stats for all habits in the database. This is slow and unnecessary because only the one habit's frequency stats should be affected by the action. We should only query get_frequency_stats for that habit, which will hopefully visibly speed things up (unless the bottleneck is just the over-the-wire call, rather than the number of habits get_frequency_stats calculates statistics for)."}}
{"actor":{"display_login":"alythobani"}}