{"action":"created","issue":{"url":"https://api.github.com/repos/phyrwork/kecs/issues/2","repository_url":"https://api.github.com/repos/phyrwork/kecs","labels_url":"https://api.github.com/repos/phyrwork/kecs/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/phyrwork/kecs/issues/2/comments","events_url":"https://api.github.com/repos/phyrwork/kecs/issues/2/events","html_url":"https://github.com/phyrwork/kecs/issues/2","id":174935952,"number":2,"title":"Optimize descendant search performance by starting descendant search 6 months before search start time.","user":{"login":"phyrwork","id":3750242,"avatar_url":"https://avatars.githubusercontent.com/u/3750242?v=3","gravatar_id":"","url":"https://api.github.com/users/phyrwork","html_url":"https://github.com/phyrwork","followers_url":"https://api.github.com/users/phyrwork/followers","following_url":"https://api.github.com/users/phyrwork/following{/other_user}","gists_url":"https://api.github.com/users/phyrwork/gists{/gist_id}","starred_url":"https://api.github.com/users/phyrwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phyrwork/subscriptions","organizations_url":"https://api.github.com/users/phyrwork/orgs","repos_url":"https://api.github.com/users/phyrwork/repos","events_url":"https://api.github.com/users/phyrwork/events{/privacy}","received_events_url":"https://api.github.com/users/phyrwork/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phyrwork/kecs/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"phyrwork","id":3750242,"avatar_url":"https://avatars.githubusercontent.com/u/3750242?v=3","gravatar_id":"","url":"https://api.github.com/users/phyrwork","html_url":"https://github.com/phyrwork","followers_url":"https://api.github.com/users/phyrwork/followers","following_url":"https://api.github.com/users/phyrwork/following{/other_user}","gists_url":"https://api.github.com/users/phyrwork/gists{/gist_id}","starred_url":"https://api.github.com/users/phyrwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phyrwork/subscriptions","organizations_url":"https://api.github.com/users/phyrwork/orgs","repos_url":"https://api.github.com/users/phyrwork/repos","events_url":"https://api.github.com/users/phyrwork/events{/privacy}","received_events_url":"https://api.github.com/users/phyrwork/received_events","type":"User","site_admin":false},"assignees":[{"login":"phyrwork","id":3750242,"avatar_url":"https://avatars.githubusercontent.com/u/3750242?v=3","gravatar_id":"","url":"https://api.github.com/users/phyrwork","html_url":"https://github.com/phyrwork","followers_url":"https://api.github.com/users/phyrwork/followers","following_url":"https://api.github.com/users/phyrwork/following{/other_user}","gists_url":"https://api.github.com/users/phyrwork/gists{/gist_id}","starred_url":"https://api.github.com/users/phyrwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phyrwork/subscriptions","organizations_url":"https://api.github.com/users/phyrwork/orgs","repos_url":"https://api.github.com/users/phyrwork/repos","events_url":"https://api.github.com/users/phyrwork/events{/privacy}","received_events_url":"https://api.github.com/users/phyrwork/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-09-04T07:30:16Z","updated_at":"2016-09-21T21:01:43Z","closed_at":null,"body":"Posts older than 6 months are archived and can no longer be voted or comment on. An effect of this is that a post cannot have a parent more than 6 months older than itself. The descendant search should therefore be started at no more than 6 months from the search start time.\r\n\r\nI don't know exactly when reddit runs its scripts to archive old posts but it's a fairly safe assumption that this happens at least once per day. If we therefore begin the search at 6 months plus a day before the start date we should catch every descendant post in the search period.\r\n\r\nThe exceptions are posts in some reddit.com operated subreddits, but these probably contribute a negligible amount to the karma economy.\r\n\r\nThe descendant search start unix timestamp could either be calculated in the KECS stored procedure or passed as an argument for more flexibility.\r\n\r\nThe overall effect of this change should be an increase in performance by minimising the length of the descendant search. This effect will only become greater over time as only recent history will need to be searched instead of all history."},"comment":{"url":"https://api.github.com/repos/phyrwork/kecs/issues/comments/248741860","html_url":"https://github.com/phyrwork/kecs/issues/2#issuecomment-248741860","issue_url":"https://api.github.com/repos/phyrwork/kecs/issues/2","id":248741860,"user":{"login":"phyrwork","id":3750242,"avatar_url":"https://avatars.githubusercontent.com/u/3750242?v=3","gravatar_id":"","url":"https://api.github.com/users/phyrwork","html_url":"https://github.com/phyrwork","followers_url":"https://api.github.com/users/phyrwork/followers","following_url":"https://api.github.com/users/phyrwork/following{/other_user}","gists_url":"https://api.github.com/users/phyrwork/gists{/gist_id}","starred_url":"https://api.github.com/users/phyrwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phyrwork/subscriptions","organizations_url":"https://api.github.com/users/phyrwork/orgs","repos_url":"https://api.github.com/users/phyrwork/repos","events_url":"https://api.github.com/users/phyrwork/events{/privacy}","received_events_url":"https://api.github.com/users/phyrwork/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T21:01:43Z","updated_at":"2016-09-21T21:01:43Z","body":"Fixed in 75843355b42034ffd7943888eaa23a59e66ed384"}}
{"actor":{"display_login":"phyrwork"}}