{"action":"opened","number":262,"pull_request":{"url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/pulls/262","id":130000695,"html_url":"https://github.com/ArchiveTeam/ArchiveBot/pull/262","diff_url":"https://github.com/ArchiveTeam/ArchiveBot/pull/262.diff","patch_url":"https://github.com/ArchiveTeam/ArchiveBot/pull/262.patch","issue_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/issues/262","number":262,"state":"open","locked":false,"title":"Cache the ignoracle patterns while primary_url and primary_netloc stay constant","user":{"login":"JustAnotherArchivist","id":29556373,"avatar_url":"https://avatars0.githubusercontent.com/u/29556373?v=3","gravatar_id":"","url":"https://api.github.com/users/JustAnotherArchivist","html_url":"https://github.com/JustAnotherArchivist","followers_url":"https://api.github.com/users/JustAnotherArchivist/followers","following_url":"https://api.github.com/users/JustAnotherArchivist/following{/other_user}","gists_url":"https://api.github.com/users/JustAnotherArchivist/gists{/gist_id}","starred_url":"https://api.github.com/users/JustAnotherArchivist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustAnotherArchivist/subscriptions","organizations_url":"https://api.github.com/users/JustAnotherArchivist/orgs","repos_url":"https://api.github.com/users/JustAnotherArchivist/repos","events_url":"https://api.github.com/users/JustAnotherArchivist/events{/privacy}","received_events_url":"https://api.github.com/users/JustAnotherArchivist/received_events","type":"User","site_admin":false},"body":"As discussed in the IRC over the past few days, the ignoracle's performance can be improved by caching the patterns until either `primary_netloc` or `primary_url` change. This prevents repeatedly regex-escaping the values of those variables, replacing them in the regexes, and potentially recompiling the regexes (Python's `re` module caches up to 512 patterns internally) on every single call to `Ignoracle.ignores`.\r\n\r\nYou can find a basic performance analysis of this at https://github.com/JustAnotherArchivist/ArchiveBot/tree/ignoracle-performance","created_at":"2017-07-11T20:41:02Z","updated_at":"2017-07-11T20:41:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/pulls/262/commits","review_comments_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/pulls/262/comments","review_comment_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/issues/262/comments","statuses_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/statuses/dea91b3fa0301ad60f2d86f65ab9ac19805631f1","head":{"label":"JustAnotherArchivist:ignoracle-regex-cache","ref":"ignoracle-regex-cache","sha":"dea91b3fa0301ad60f2d86f65ab9ac19805631f1","user":{"login":"JustAnotherArchivist","id":29556373,"avatar_url":"https://avatars0.githubusercontent.com/u/29556373?v=3","gravatar_id":"","url":"https://api.github.com/users/JustAnotherArchivist","html_url":"https://github.com/JustAnotherArchivist","followers_url":"https://api.github.com/users/JustAnotherArchivist/followers","following_url":"https://api.github.com/users/JustAnotherArchivist/following{/other_user}","gists_url":"https://api.github.com/users/JustAnotherArchivist/gists{/gist_id}","starred_url":"https://api.github.com/users/JustAnotherArchivist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustAnotherArchivist/subscriptions","organizations_url":"https://api.github.com/users/JustAnotherArchivist/orgs","repos_url":"https://api.github.com/users/JustAnotherArchivist/repos","events_url":"https://api.github.com/users/JustAnotherArchivist/events{/privacy}","received_events_url":"https://api.github.com/users/JustAnotherArchivist/received_events","type":"User","site_admin":false},"repo":{"id":96932864,"name":"ArchiveBot","full_name":"JustAnotherArchivist/ArchiveBot","owner":{"login":"JustAnotherArchivist","id":29556373,"avatar_url":"https://avatars0.githubusercontent.com/u/29556373?v=3","gravatar_id":"","url":"https://api.github.com/users/JustAnotherArchivist","html_url":"https://github.com/JustAnotherArchivist","followers_url":"https://api.github.com/users/JustAnotherArchivist/followers","following_url":"https://api.github.com/users/JustAnotherArchivist/following{/other_user}","gists_url":"https://api.github.com/users/JustAnotherArchivist/gists{/gist_id}","starred_url":"https://api.github.com/users/JustAnotherArchivist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustAnotherArchivist/subscriptions","organizations_url":"https://api.github.com/users/JustAnotherArchivist/orgs","repos_url":"https://api.github.com/users/JustAnotherArchivist/repos","events_url":"https://api.github.com/users/JustAnotherArchivist/events{/privacy}","received_events_url":"https://api.github.com/users/JustAnotherArchivist/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JustAnotherArchivist/ArchiveBot","description":"ArchiveBot, an IRC bot for archiving websites","fork":true,"url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot","forks_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/forks","keys_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/teams","hooks_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/hooks","issue_events_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/issues/events{/number}","events_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/events","assignees_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/assignees{/user}","branches_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/branches{/branch}","tags_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/tags","blobs_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/git/refs{/sha}","trees_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/statuses/{sha}","languages_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/languages","stargazers_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/stargazers","contributors_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/contributors","subscribers_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/subscribers","subscription_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/subscription","commits_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/commits{/sha}","git_commits_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/git/commits{/sha}","comments_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/comments{/number}","issue_comment_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/issues/comments{/number}","contents_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/contents/{+path}","compare_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/merges","archive_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/downloads","issues_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/issues{/number}","pulls_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/pulls{/number}","milestones_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/milestones{/number}","notifications_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/labels{/name}","releases_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/releases{/id}","deployments_url":"https://api.github.com/repos/JustAnotherArchivist/ArchiveBot/deployments","created_at":"2017-07-11T20:07:51Z","updated_at":"2017-07-11T20:07:53Z","pushed_at":"2017-07-11T20:31:16Z","git_url":"git://github.com/JustAnotherArchivist/ArchiveBot.git","ssh_url":"git@github.com:JustAnotherArchivist/ArchiveBot.git","clone_url":"https://github.com/JustAnotherArchivist/ArchiveBot.git","svn_url":"https://github.com/JustAnotherArchivist/ArchiveBot","homepage":"http://www.archiveteam.org/index.php?title=ArchiveBot","size":2197,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"ArchiveTeam:master","ref":"master","sha":"412936b917d24bbe646e70aba067e05777d144dd","user":{"login":"ArchiveTeam","id":774774,"avatar_url":"https://avatars0.githubusercontent.com/u/774774?v=3","gravatar_id":"","url":"https://api.github.com/users/ArchiveTeam","html_url":"https://github.com/ArchiveTeam","followers_url":"https://api.github.com/users/ArchiveTeam/followers","following_url":"https://api.github.com/users/ArchiveTeam/following{/other_user}","gists_url":"https://api.github.com/users/ArchiveTeam/gists{/gist_id}","starred_url":"https://api.github.com/users/ArchiveTeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArchiveTeam/subscriptions","organizations_url":"https://api.github.com/users/ArchiveTeam/orgs","repos_url":"https://api.github.com/users/ArchiveTeam/repos","events_url":"https://api.github.com/users/ArchiveTeam/events{/privacy}","received_events_url":"https://api.github.com/users/ArchiveTeam/received_events","type":"Organization","site_admin":false},"repo":{"id":12636383,"name":"ArchiveBot","full_name":"ArchiveTeam/ArchiveBot","owner":{"login":"ArchiveTeam","id":774774,"avatar_url":"https://avatars0.githubusercontent.com/u/774774?v=3","gravatar_id":"","url":"https://api.github.com/users/ArchiveTeam","html_url":"https://github.com/ArchiveTeam","followers_url":"https://api.github.com/users/ArchiveTeam/followers","following_url":"https://api.github.com/users/ArchiveTeam/following{/other_user}","gists_url":"https://api.github.com/users/ArchiveTeam/gists{/gist_id}","starred_url":"https://api.github.com/users/ArchiveTeam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArchiveTeam/subscriptions","organizations_url":"https://api.github.com/users/ArchiveTeam/orgs","repos_url":"https://api.github.com/users/ArchiveTeam/repos","events_url":"https://api.github.com/users/ArchiveTeam/events{/privacy}","received_events_url":"https://api.github.com/users/ArchiveTeam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArchiveTeam/ArchiveBot","description":"ArchiveBot, an IRC bot for archiving websites","fork":false,"url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot","forks_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/forks","keys_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/teams","hooks_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/hooks","issue_events_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/issues/events{/number}","events_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/events","assignees_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/assignees{/user}","branches_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/branches{/branch}","tags_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/tags","blobs_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/statuses/{sha}","languages_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/languages","stargazers_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/stargazers","contributors_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/contributors","subscribers_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/subscribers","subscription_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/subscription","commits_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/contents/{+path}","compare_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/merges","archive_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/downloads","issues_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/issues{/number}","pulls_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/pulls{/number}","milestones_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/milestones{/number}","notifications_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/labels{/name}","releases_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/releases{/id}","deployments_url":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/deployments","created_at":"2013-09-06T05:13:57Z","updated_at":"2017-07-06T04:14:58Z","pushed_at":"2017-07-03T06:33:18Z","git_url":"git://github.com/ArchiveTeam/ArchiveBot.git","ssh_url":"git@github.com:ArchiveTeam/ArchiveBot.git","clone_url":"https://github.com/ArchiveTeam/ArchiveBot.git","svn_url":"https://github.com/ArchiveTeam/ArchiveBot","homepage":"http://www.archiveteam.org/index.php?title=ArchiveBot","size":2197,"stargazers_count":93,"watchers_count":93,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":78,"forks":30,"open_issues":78,"watchers":93,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/pulls/262"},"html":{"href":"https://github.com/ArchiveTeam/ArchiveBot/pull/262"},"issue":{"href":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/issues/262"},"comments":{"href":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/issues/262/comments"},"review_comments":{"href":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/pulls/262/comments"},"review_comment":{"href":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/pulls/262/commits"},"statuses":{"href":"https://api.github.com/repos/ArchiveTeam/ArchiveBot/statuses/dea91b3fa0301ad60f2d86f65ab9ac19805631f1"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":29,"deletions":14,"changed_files":1}}
{"actor":{"display_login":"JustAnotherArchivist"}}