{"action":"closed","number":785,"pull_request":{"url":"https://api.github.com/repos/duckduckgo/community-platform/pulls/785","id":38535447,"html_url":"https://github.com/duckduckgo/community-platform/pull/785","diff_url":"https://github.com/duckduckgo/community-platform/pull/785.diff","patch_url":"https://github.com/duckduckgo/community-platform/pull/785.patch","issue_url":"https://api.github.com/repos/duckduckgo/community-platform/issues/785","number":785,"state":"closed","locked":false,"title":"Fix apparent DDGC::Util::Markup instantiation leak.","user":{"login":"jbarrett","id":444449,"avatar_url":"https://avatars.githubusercontent.com/u/444449?v=3","gravatar_id":"","url":"https://api.github.com/users/jbarrett","html_url":"https://github.com/jbarrett","followers_url":"https://api.github.com/users/jbarrett/followers","following_url":"https://api.github.com/users/jbarrett/following{/other_user}","gists_url":"https://api.github.com/users/jbarrett/gists{/gist_id}","starred_url":"https://api.github.com/users/jbarrett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbarrett/subscriptions","organizations_url":"https://api.github.com/users/jbarrett/orgs","repos_url":"https://api.github.com/users/jbarrett/repos","events_url":"https://api.github.com/users/jbarrett/events{/privacy}","received_events_url":"https://api.github.com/users/jbarrett/received_events","type":"User","site_admin":false},"body":"@nilnilnil @malbin #784 paying off already.\r\n\r\n/blog.json appears to be leaking `DDGC::Util::Markup` instances like crazy. This moves the facility out to the application and makes an instance available via a plugin keyword.\r\n\r\n#### Before:\r\n\r\n```\r\n$ script/ddgc_leak_report.pl 1 '/blog.json' 2>&1 | grep -v ^DEP\r\nTracked objects by class:\r\n        DBD::Pg::DefaultValue                    1\r\n        DBI::var                                 5\r\n        DDGC::Util::Markup                       38\r\n        Hash::Merge                              2\r\n$ script/ddgc_leak_report.pl 100 '/blog.json' 2>&1 | grep -v ^DEP                                                                                                                                 \r\nTracked objects by class:\r\n        DBD::Pg::DefaultValue                    1\r\n        DBI::var                                 5\r\n        DDGC::Util::Markup                       3800\r\n        Hash::Merge                              2\r\n```\r\n\r\n#### After:\r\n```\r\n$ script/ddgc_leak_report.pl 1 '/blog.json' 2>&1 | grep -v ^DEP\r\nTracked objects by class:\r\n        DBD::Pg::DefaultValue                    1\r\n        DBI::var                                 5\r\n        Hash::Merge                              2\r\nYou have new mail in /var/mail/ubuntu\r\n$ script/ddgc_leak_report.pl 100 '/blog.json' 2>&1 | grep -v ^DEP                                                                                                                              \r\nTracked objects by class:\r\n        DBD::Pg::DefaultValue                    1\r\n        DBI::var                                 5\r\n        Hash::Merge                              2\r\n```\r\n\r\nInstantiating this for each render request was bad either way.\r\n\r\nThis may make support for the \"Open forum links in new window\" user setting awkward later, but that strikes me as a bit of an unfeature anyway - users who want new windows/tabs typically know how to achieve that in their user agent.","created_at":"2015-06-25T11:02:46Z","updated_at":"2015-06-25T15:04:03Z","closed_at":"2015-06-25T15:04:02Z","merged_at":"2015-06-25T15:04:02Z","merge_commit_sha":"f818725fc88fca229343b89dc0855c76e2655987","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/duckduckgo/community-platform/pulls/785/commits","review_comments_url":"https://api.github.com/repos/duckduckgo/community-platform/pulls/785/comments","review_comment_url":"https://api.github.com/repos/duckduckgo/community-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/duckduckgo/community-platform/issues/785/comments","statuses_url":"https://api.github.com/repos/duckduckgo/community-platform/statuses/0f05722530c07083952e01172a5f372404b84913","head":{"label":"duckduckgo:john/blog-markup-leak","ref":"john/blog-markup-leak","sha":"0f05722530c07083952e01172a5f372404b84913","user":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"repo":{"id":1751775,"name":"community-platform","full_name":"duckduckgo/community-platform","owner":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duckduckgo/community-platform","description":"DuckDuckGo Community Platform","fork":false,"url":"https://api.github.com/repos/duckduckgo/community-platform","forks_url":"https://api.github.com/repos/duckduckgo/community-platform/forks","keys_url":"https://api.github.com/repos/duckduckgo/community-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/community-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/community-platform/teams","hooks_url":"https://api.github.com/repos/duckduckgo/community-platform/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/community-platform/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/community-platform/events","assignees_url":"https://api.github.com/repos/duckduckgo/community-platform/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/community-platform/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/community-platform/tags","blobs_url":"https://api.github.com/repos/duckduckgo/community-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/community-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/community-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/community-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/community-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/community-platform/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/community-platform/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/community-platform/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/community-platform/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/community-platform/subscription","commits_url":"https://api.github.com/repos/duckduckgo/community-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/community-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/community-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/community-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/community-platform/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/community-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/community-platform/merges","archive_url":"https://api.github.com/repos/duckduckgo/community-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/community-platform/downloads","issues_url":"https://api.github.com/repos/duckduckgo/community-platform/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/community-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/community-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/community-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/community-platform/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/community-platform/releases{/id}","created_at":"2011-05-15T17:35:41Z","updated_at":"2015-06-25T10:41:29Z","pushed_at":"2015-06-25T15:04:02Z","git_url":"git://github.com/duckduckgo/community-platform.git","ssh_url":"git@github.com:duckduckgo/community-platform.git","clone_url":"https://github.com/duckduckgo/community-platform.git","svn_url":"https://github.com/duckduckgo/community-platform","homepage":"https://duck.co/","size":36626,"stargazers_count":348,"watchers_count":348,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":88,"mirror_url":null,"open_issues_count":115,"forks":88,"open_issues":115,"watchers":348,"default_branch":"master"}},"base":{"label":"duckduckgo:dev-community","ref":"dev-community","sha":"28bf86c150581048847a6df67001a7d4f1487b1e","user":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"repo":{"id":1751775,"name":"community-platform","full_name":"duckduckgo/community-platform","owner":{"login":"duckduckgo","id":342708,"avatar_url":"https://avatars.githubusercontent.com/u/342708?v=3","gravatar_id":"","url":"https://api.github.com/users/duckduckgo","html_url":"https://github.com/duckduckgo","followers_url":"https://api.github.com/users/duckduckgo/followers","following_url":"https://api.github.com/users/duckduckgo/following{/other_user}","gists_url":"https://api.github.com/users/duckduckgo/gists{/gist_id}","starred_url":"https://api.github.com/users/duckduckgo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duckduckgo/subscriptions","organizations_url":"https://api.github.com/users/duckduckgo/orgs","repos_url":"https://api.github.com/users/duckduckgo/repos","events_url":"https://api.github.com/users/duckduckgo/events{/privacy}","received_events_url":"https://api.github.com/users/duckduckgo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/duckduckgo/community-platform","description":"DuckDuckGo Community Platform","fork":false,"url":"https://api.github.com/repos/duckduckgo/community-platform","forks_url":"https://api.github.com/repos/duckduckgo/community-platform/forks","keys_url":"https://api.github.com/repos/duckduckgo/community-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/duckduckgo/community-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/duckduckgo/community-platform/teams","hooks_url":"https://api.github.com/repos/duckduckgo/community-platform/hooks","issue_events_url":"https://api.github.com/repos/duckduckgo/community-platform/issues/events{/number}","events_url":"https://api.github.com/repos/duckduckgo/community-platform/events","assignees_url":"https://api.github.com/repos/duckduckgo/community-platform/assignees{/user}","branches_url":"https://api.github.com/repos/duckduckgo/community-platform/branches{/branch}","tags_url":"https://api.github.com/repos/duckduckgo/community-platform/tags","blobs_url":"https://api.github.com/repos/duckduckgo/community-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/duckduckgo/community-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/duckduckgo/community-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/duckduckgo/community-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/duckduckgo/community-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/duckduckgo/community-platform/languages","stargazers_url":"https://api.github.com/repos/duckduckgo/community-platform/stargazers","contributors_url":"https://api.github.com/repos/duckduckgo/community-platform/contributors","subscribers_url":"https://api.github.com/repos/duckduckgo/community-platform/subscribers","subscription_url":"https://api.github.com/repos/duckduckgo/community-platform/subscription","commits_url":"https://api.github.com/repos/duckduckgo/community-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/duckduckgo/community-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/duckduckgo/community-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/duckduckgo/community-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/duckduckgo/community-platform/contents/{+path}","compare_url":"https://api.github.com/repos/duckduckgo/community-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/duckduckgo/community-platform/merges","archive_url":"https://api.github.com/repos/duckduckgo/community-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/duckduckgo/community-platform/downloads","issues_url":"https://api.github.com/repos/duckduckgo/community-platform/issues{/number}","pulls_url":"https://api.github.com/repos/duckduckgo/community-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/duckduckgo/community-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/duckduckgo/community-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/duckduckgo/community-platform/labels{/name}","releases_url":"https://api.github.com/repos/duckduckgo/community-platform/releases{/id}","created_at":"2011-05-15T17:35:41Z","updated_at":"2015-06-25T10:41:29Z","pushed_at":"2015-06-25T15:04:02Z","git_url":"git://github.com/duckduckgo/community-platform.git","ssh_url":"git@github.com:duckduckgo/community-platform.git","clone_url":"https://github.com/duckduckgo/community-platform.git","svn_url":"https://github.com/duckduckgo/community-platform","homepage":"https://duck.co/","size":36626,"stargazers_count":348,"watchers_count":348,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":88,"mirror_url":null,"open_issues_count":115,"forks":88,"open_issues":115,"watchers":348,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/duckduckgo/community-platform/pulls/785"},"html":{"href":"https://github.com/duckduckgo/community-platform/pull/785"},"issue":{"href":"https://api.github.com/repos/duckduckgo/community-platform/issues/785"},"comments":{"href":"https://api.github.com/repos/duckduckgo/community-platform/issues/785/comments"},"review_comments":{"href":"https://api.github.com/repos/duckduckgo/community-platform/pulls/785/comments"},"review_comment":{"href":"https://api.github.com/repos/duckduckgo/community-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/duckduckgo/community-platform/pulls/785/commits"},"statuses":{"href":"https://api.github.com/repos/duckduckgo/community-platform/statuses/0f05722530c07083952e01172a5f372404b84913"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"nilnilnil","id":347240,"avatar_url":"https://avatars.githubusercontent.com/u/347240?v=3","gravatar_id":"","url":"https://api.github.com/users/nilnilnil","html_url":"https://github.com/nilnilnil","followers_url":"https://api.github.com/users/nilnilnil/followers","following_url":"https://api.github.com/users/nilnilnil/following{/other_user}","gists_url":"https://api.github.com/users/nilnilnil/gists{/gist_id}","starred_url":"https://api.github.com/users/nilnilnil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nilnilnil/subscriptions","organizations_url":"https://api.github.com/users/nilnilnil/orgs","repos_url":"https://api.github.com/users/nilnilnil/repos","events_url":"https://api.github.com/users/nilnilnil/events{/privacy}","received_events_url":"https://api.github.com/users/nilnilnil/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":3,"additions":67,"deletions":9,"changed_files":4}}