{"action":"opened","number":17,"pull_request":{"url":"https://api.github.com/repos/tchap/go-patricia/pulls/17","id":44236421,"html_url":"https://github.com/tchap/go-patricia/pull/17","diff_url":"https://github.com/tchap/go-patricia/pull/17.diff","patch_url":"https://github.com/tchap/go-patricia/pull/17.patch","issue_url":"https://api.github.com/repos/tchap/go-patricia/issues/17","number":17,"state":"open","locked":false,"title":"Avoid accumulating \"empty\" nodes","user":{"login":"glyn","id":94953,"avatar_url":"https://avatars.githubusercontent.com/u/94953?v=3","gravatar_id":"","url":"https://api.github.com/users/glyn","html_url":"https://github.com/glyn","followers_url":"https://api.github.com/users/glyn/followers","following_url":"https://api.github.com/users/glyn/following{/other_user}","gists_url":"https://api.github.com/users/glyn/gists{/gist_id}","starred_url":"https://api.github.com/users/glyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glyn/subscriptions","organizations_url":"https://api.github.com/users/glyn/orgs","repos_url":"https://api.github.com/users/glyn/repos","events_url":"https://api.github.com/users/glyn/events{/privacy}","received_events_url":"https://api.github.com/users/glyn/received_events","type":"User","site_admin":false},"body":"This commit includes tests which show that adding entries to a trie\r\nand deleting them all leaves \"empty\" nodes (i.e. those with a nil\r\nitem) around. In long-running processes, this leads to excessive\r\nmemory usage. The fix is to prune some unnecessary nodes during\r\ndeletion.\r\n\r\nNote: there is a trade-off against performance. We attempt to prune a\r\nnode which has been deleted, but we don't attempt to prune its\r\nancestors. The latter approach made performance of the \"random kitchen\r\nsink\" test worse by at least two orders of magnitude.\r\n\r\nAlso note that the diagnostic methods added here could be stripped out if\r\nthis is preferred.\r\n\r\n@goonzoid && @glyn","created_at":"2015-09-04T16:24:53Z","updated_at":"2015-09-04T16:24:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tchap/go-patricia/pulls/17/commits","review_comments_url":"https://api.github.com/repos/tchap/go-patricia/pulls/17/comments","review_comment_url":"https://api.github.com/repos/tchap/go-patricia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tchap/go-patricia/issues/17/comments","statuses_url":"https://api.github.com/repos/tchap/go-patricia/statuses/1b8b66ea8f77e11a023a0df5bda52309143c4b13","head":{"label":"cloudfoundry-incubator:leak","ref":"leak","sha":"1b8b66ea8f77e11a023a0df5bda52309143c4b13","user":{"login":"cloudfoundry-incubator","id":5680605,"avatar_url":"https://avatars.githubusercontent.com/u/5680605?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudfoundry-incubator","html_url":"https://github.com/cloudfoundry-incubator","followers_url":"https://api.github.com/users/cloudfoundry-incubator/followers","following_url":"https://api.github.com/users/cloudfoundry-incubator/following{/other_user}","gists_url":"https://api.github.com/users/cloudfoundry-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudfoundry-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudfoundry-incubator/subscriptions","organizations_url":"https://api.github.com/users/cloudfoundry-incubator/orgs","repos_url":"https://api.github.com/users/cloudfoundry-incubator/repos","events_url":"https://api.github.com/users/cloudfoundry-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/cloudfoundry-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":41922929,"name":"go-patricia","full_name":"cloudfoundry-incubator/go-patricia","owner":{"login":"cloudfoundry-incubator","id":5680605,"avatar_url":"https://avatars.githubusercontent.com/u/5680605?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudfoundry-incubator","html_url":"https://github.com/cloudfoundry-incubator","followers_url":"https://api.github.com/users/cloudfoundry-incubator/followers","following_url":"https://api.github.com/users/cloudfoundry-incubator/following{/other_user}","gists_url":"https://api.github.com/users/cloudfoundry-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudfoundry-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudfoundry-incubator/subscriptions","organizations_url":"https://api.github.com/users/cloudfoundry-incubator/orgs","repos_url":"https://api.github.com/users/cloudfoundry-incubator/repos","events_url":"https://api.github.com/users/cloudfoundry-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/cloudfoundry-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudfoundry-incubator/go-patricia","description":"A generic patricia trie (also called radix tree) implemented in Go (Golang)","fork":true,"url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia","forks_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/forks","keys_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/teams","hooks_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/hooks","issue_events_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/issues/events{/number}","events_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/events","assignees_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/assignees{/user}","branches_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/branches{/branch}","tags_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/tags","blobs_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/languages","stargazers_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/stargazers","contributors_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/contributors","subscribers_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/subscribers","subscription_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/subscription","commits_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/contents/{+path}","compare_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/merges","archive_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/downloads","issues_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/issues{/number}","pulls_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/labels{/name}","releases_url":"https://api.github.com/repos/cloudfoundry-incubator/go-patricia/releases{/id}","created_at":"2015-09-04T15:21:47Z","updated_at":"2015-09-04T15:21:47Z","pushed_at":"2015-09-04T16:22:08Z","git_url":"git://github.com/cloudfoundry-incubator/go-patricia.git","ssh_url":"git@github.com:cloudfoundry-incubator/go-patricia.git","clone_url":"https://github.com/cloudfoundry-incubator/go-patricia.git","svn_url":"https://github.com/cloudfoundry-incubator/go-patricia","homepage":"","size":115,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tchap:master","ref":"master","sha":"a560f85131e8aafc2cc4bcb1e265ae3fc6ee5f50","user":{"login":"tchap","id":697127,"avatar_url":"https://avatars.githubusercontent.com/u/697127?v=3","gravatar_id":"","url":"https://api.github.com/users/tchap","html_url":"https://github.com/tchap","followers_url":"https://api.github.com/users/tchap/followers","following_url":"https://api.github.com/users/tchap/following{/other_user}","gists_url":"https://api.github.com/users/tchap/gists{/gist_id}","starred_url":"https://api.github.com/users/tchap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchap/subscriptions","organizations_url":"https://api.github.com/users/tchap/orgs","repos_url":"https://api.github.com/users/tchap/repos","events_url":"https://api.github.com/users/tchap/events{/privacy}","received_events_url":"https://api.github.com/users/tchap/received_events","type":"User","site_admin":false},"repo":{"id":15849159,"name":"go-patricia","full_name":"tchap/go-patricia","owner":{"login":"tchap","id":697127,"avatar_url":"https://avatars.githubusercontent.com/u/697127?v=3","gravatar_id":"","url":"https://api.github.com/users/tchap","html_url":"https://github.com/tchap","followers_url":"https://api.github.com/users/tchap/followers","following_url":"https://api.github.com/users/tchap/following{/other_user}","gists_url":"https://api.github.com/users/tchap/gists{/gist_id}","starred_url":"https://api.github.com/users/tchap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tchap/subscriptions","organizations_url":"https://api.github.com/users/tchap/orgs","repos_url":"https://api.github.com/users/tchap/repos","events_url":"https://api.github.com/users/tchap/events{/privacy}","received_events_url":"https://api.github.com/users/tchap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tchap/go-patricia","description":"A generic patricia trie (also called radix tree) implemented in Go (Golang)","fork":false,"url":"https://api.github.com/repos/tchap/go-patricia","forks_url":"https://api.github.com/repos/tchap/go-patricia/forks","keys_url":"https://api.github.com/repos/tchap/go-patricia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tchap/go-patricia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tchap/go-patricia/teams","hooks_url":"https://api.github.com/repos/tchap/go-patricia/hooks","issue_events_url":"https://api.github.com/repos/tchap/go-patricia/issues/events{/number}","events_url":"https://api.github.com/repos/tchap/go-patricia/events","assignees_url":"https://api.github.com/repos/tchap/go-patricia/assignees{/user}","branches_url":"https://api.github.com/repos/tchap/go-patricia/branches{/branch}","tags_url":"https://api.github.com/repos/tchap/go-patricia/tags","blobs_url":"https://api.github.com/repos/tchap/go-patricia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tchap/go-patricia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tchap/go-patricia/git/refs{/sha}","trees_url":"https://api.github.com/repos/tchap/go-patricia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tchap/go-patricia/statuses/{sha}","languages_url":"https://api.github.com/repos/tchap/go-patricia/languages","stargazers_url":"https://api.github.com/repos/tchap/go-patricia/stargazers","contributors_url":"https://api.github.com/repos/tchap/go-patricia/contributors","subscribers_url":"https://api.github.com/repos/tchap/go-patricia/subscribers","subscription_url":"https://api.github.com/repos/tchap/go-patricia/subscription","commits_url":"https://api.github.com/repos/tchap/go-patricia/commits{/sha}","git_commits_url":"https://api.github.com/repos/tchap/go-patricia/git/commits{/sha}","comments_url":"https://api.github.com/repos/tchap/go-patricia/comments{/number}","issue_comment_url":"https://api.github.com/repos/tchap/go-patricia/issues/comments{/number}","contents_url":"https://api.github.com/repos/tchap/go-patricia/contents/{+path}","compare_url":"https://api.github.com/repos/tchap/go-patricia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tchap/go-patricia/merges","archive_url":"https://api.github.com/repos/tchap/go-patricia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tchap/go-patricia/downloads","issues_url":"https://api.github.com/repos/tchap/go-patricia/issues{/number}","pulls_url":"https://api.github.com/repos/tchap/go-patricia/pulls{/number}","milestones_url":"https://api.github.com/repos/tchap/go-patricia/milestones{/number}","notifications_url":"https://api.github.com/repos/tchap/go-patricia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tchap/go-patricia/labels{/name}","releases_url":"https://api.github.com/repos/tchap/go-patricia/releases{/id}","created_at":"2014-01-12T19:34:48Z","updated_at":"2015-08-28T02:39:55Z","pushed_at":"2015-06-11T07:56:05Z","git_url":"git://github.com/tchap/go-patricia.git","ssh_url":"git@github.com:tchap/go-patricia.git","clone_url":"https://github.com/tchap/go-patricia.git","svn_url":"https://github.com/tchap/go-patricia","homepage":"","size":473,"stargazers_count":95,"watchers_count":95,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":3,"forks":25,"open_issues":3,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tchap/go-patricia/pulls/17"},"html":{"href":"https://github.com/tchap/go-patricia/pull/17"},"issue":{"href":"https://api.github.com/repos/tchap/go-patricia/issues/17"},"comments":{"href":"https://api.github.com/repos/tchap/go-patricia/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/tchap/go-patricia/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/tchap/go-patricia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tchap/go-patricia/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/tchap/go-patricia/statuses/1b8b66ea8f77e11a023a0df5bda52309143c4b13"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":169,"deletions":1,"changed_files":4}}