{"action":"opened","number":5,"pull_request":{"url":"https://api.github.com/repos/mcuadros/go-version/pulls/5","id":191365678,"html_url":"https://github.com/mcuadros/go-version/pull/5","diff_url":"https://github.com/mcuadros/go-version/pull/5.diff","patch_url":"https://github.com/mcuadros/go-version/pull/5.patch","issue_url":"https://api.github.com/repos/mcuadros/go-version/issues/5","number":5,"state":"open","locked":false,"title":"Fix memory leak and speed up.","user":{"login":"pkumza","id":5299211,"avatar_url":"https://avatars0.githubusercontent.com/u/5299211?v=4","gravatar_id":"","url":"https://api.github.com/users/pkumza","html_url":"https://github.com/pkumza","followers_url":"https://api.github.com/users/pkumza/followers","following_url":"https://api.github.com/users/pkumza/following{/other_user}","gists_url":"https://api.github.com/users/pkumza/gists{/gist_id}","starred_url":"https://api.github.com/users/pkumza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkumza/subscriptions","organizations_url":"https://api.github.com/users/pkumza/orgs","repos_url":"https://api.github.com/users/pkumza/repos","events_url":"https://api.github.com/users/pkumza/events{/privacy}","received_events_url":"https://api.github.com/users/pkumza/received_events","type":"User","site_admin":false},"body":"DO NOT create new regex expression every time when the pattern has been compiled so many times.\r\n\r\nI've made a cache for `*regexp.Regexp`. \r\nIn most cases, MustCompile would hit cache, which could speed up the process.\r\n\r\n----\r\n\r\nPS:\r\nI use go-version heavily in my project.\r\nGolang's `pprof` told me that \"xxx.xxx.xxx/xxx/vendor/github.com/mcuadros/go-version.RegFind (75289.45MB)\"\r\nThat's Horrible.🤒","created_at":"2018-05-30T08:03:22Z","updated_at":"2018-05-30T08:03:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mcuadros/go-version/pulls/5/commits","review_comments_url":"https://api.github.com/repos/mcuadros/go-version/pulls/5/comments","review_comment_url":"https://api.github.com/repos/mcuadros/go-version/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mcuadros/go-version/issues/5/comments","statuses_url":"https://api.github.com/repos/mcuadros/go-version/statuses/3ce6bf0b41a137c16deacd4b93dfa12b31df1f80","head":{"label":"pkumza:fix_mem_leak","ref":"fix_mem_leak","sha":"3ce6bf0b41a137c16deacd4b93dfa12b31df1f80","user":{"login":"pkumza","id":5299211,"avatar_url":"https://avatars0.githubusercontent.com/u/5299211?v=4","gravatar_id":"","url":"https://api.github.com/users/pkumza","html_url":"https://github.com/pkumza","followers_url":"https://api.github.com/users/pkumza/followers","following_url":"https://api.github.com/users/pkumza/following{/other_user}","gists_url":"https://api.github.com/users/pkumza/gists{/gist_id}","starred_url":"https://api.github.com/users/pkumza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkumza/subscriptions","organizations_url":"https://api.github.com/users/pkumza/orgs","repos_url":"https://api.github.com/users/pkumza/repos","events_url":"https://api.github.com/users/pkumza/events{/privacy}","received_events_url":"https://api.github.com/users/pkumza/received_events","type":"User","site_admin":false},"repo":{"id":135407477,"name":"go-version","full_name":"pkumza/go-version","owner":{"login":"pkumza","id":5299211,"avatar_url":"https://avatars0.githubusercontent.com/u/5299211?v=4","gravatar_id":"","url":"https://api.github.com/users/pkumza","html_url":"https://github.com/pkumza","followers_url":"https://api.github.com/users/pkumza/followers","following_url":"https://api.github.com/users/pkumza/following{/other_user}","gists_url":"https://api.github.com/users/pkumza/gists{/gist_id}","starred_url":"https://api.github.com/users/pkumza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkumza/subscriptions","organizations_url":"https://api.github.com/users/pkumza/orgs","repos_url":"https://api.github.com/users/pkumza/repos","events_url":"https://api.github.com/users/pkumza/events{/privacy}","received_events_url":"https://api.github.com/users/pkumza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pkumza/go-version","description":"Version normalizer and comparison library for go","fork":true,"url":"https://api.github.com/repos/pkumza/go-version","forks_url":"https://api.github.com/repos/pkumza/go-version/forks","keys_url":"https://api.github.com/repos/pkumza/go-version/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkumza/go-version/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkumza/go-version/teams","hooks_url":"https://api.github.com/repos/pkumza/go-version/hooks","issue_events_url":"https://api.github.com/repos/pkumza/go-version/issues/events{/number}","events_url":"https://api.github.com/repos/pkumza/go-version/events","assignees_url":"https://api.github.com/repos/pkumza/go-version/assignees{/user}","branches_url":"https://api.github.com/repos/pkumza/go-version/branches{/branch}","tags_url":"https://api.github.com/repos/pkumza/go-version/tags","blobs_url":"https://api.github.com/repos/pkumza/go-version/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkumza/go-version/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkumza/go-version/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkumza/go-version/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkumza/go-version/statuses/{sha}","languages_url":"https://api.github.com/repos/pkumza/go-version/languages","stargazers_url":"https://api.github.com/repos/pkumza/go-version/stargazers","contributors_url":"https://api.github.com/repos/pkumza/go-version/contributors","subscribers_url":"https://api.github.com/repos/pkumza/go-version/subscribers","subscription_url":"https://api.github.com/repos/pkumza/go-version/subscription","commits_url":"https://api.github.com/repos/pkumza/go-version/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkumza/go-version/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkumza/go-version/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkumza/go-version/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkumza/go-version/contents/{+path}","compare_url":"https://api.github.com/repos/pkumza/go-version/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkumza/go-version/merges","archive_url":"https://api.github.com/repos/pkumza/go-version/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkumza/go-version/downloads","issues_url":"https://api.github.com/repos/pkumza/go-version/issues{/number}","pulls_url":"https://api.github.com/repos/pkumza/go-version/pulls{/number}","milestones_url":"https://api.github.com/repos/pkumza/go-version/milestones{/number}","notifications_url":"https://api.github.com/repos/pkumza/go-version/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkumza/go-version/labels{/name}","releases_url":"https://api.github.com/repos/pkumza/go-version/releases{/id}","deployments_url":"https://api.github.com/repos/pkumza/go-version/deployments","created_at":"2018-05-30T07:48:10Z","updated_at":"2018-05-30T07:56:39Z","pushed_at":"2018-05-30T07:56:38Z","git_url":"git://github.com/pkumza/go-version.git","ssh_url":"git@github.com:pkumza/go-version.git","clone_url":"https://github.com/pkumza/go-version.git","svn_url":"https://github.com/pkumza/go-version","homepage":null,"size":33,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mcuadros:master","ref":"master","sha":"88e56e02bea1c203c99222c365fa52a69996ccac","user":{"login":"mcuadros","id":1573114,"avatar_url":"https://avatars0.githubusercontent.com/u/1573114?v=4","gravatar_id":"","url":"https://api.github.com/users/mcuadros","html_url":"https://github.com/mcuadros","followers_url":"https://api.github.com/users/mcuadros/followers","following_url":"https://api.github.com/users/mcuadros/following{/other_user}","gists_url":"https://api.github.com/users/mcuadros/gists{/gist_id}","starred_url":"https://api.github.com/users/mcuadros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcuadros/subscriptions","organizations_url":"https://api.github.com/users/mcuadros/orgs","repos_url":"https://api.github.com/users/mcuadros/repos","events_url":"https://api.github.com/users/mcuadros/events{/privacy}","received_events_url":"https://api.github.com/users/mcuadros/received_events","type":"User","site_admin":false},"repo":{"id":9658206,"name":"go-version","full_name":"mcuadros/go-version","owner":{"login":"mcuadros","id":1573114,"avatar_url":"https://avatars0.githubusercontent.com/u/1573114?v=4","gravatar_id":"","url":"https://api.github.com/users/mcuadros","html_url":"https://github.com/mcuadros","followers_url":"https://api.github.com/users/mcuadros/followers","following_url":"https://api.github.com/users/mcuadros/following{/other_user}","gists_url":"https://api.github.com/users/mcuadros/gists{/gist_id}","starred_url":"https://api.github.com/users/mcuadros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcuadros/subscriptions","organizations_url":"https://api.github.com/users/mcuadros/orgs","repos_url":"https://api.github.com/users/mcuadros/repos","events_url":"https://api.github.com/users/mcuadros/events{/privacy}","received_events_url":"https://api.github.com/users/mcuadros/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcuadros/go-version","description":"Version normalizer and comparison library for go","fork":false,"url":"https://api.github.com/repos/mcuadros/go-version","forks_url":"https://api.github.com/repos/mcuadros/go-version/forks","keys_url":"https://api.github.com/repos/mcuadros/go-version/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcuadros/go-version/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcuadros/go-version/teams","hooks_url":"https://api.github.com/repos/mcuadros/go-version/hooks","issue_events_url":"https://api.github.com/repos/mcuadros/go-version/issues/events{/number}","events_url":"https://api.github.com/repos/mcuadros/go-version/events","assignees_url":"https://api.github.com/repos/mcuadros/go-version/assignees{/user}","branches_url":"https://api.github.com/repos/mcuadros/go-version/branches{/branch}","tags_url":"https://api.github.com/repos/mcuadros/go-version/tags","blobs_url":"https://api.github.com/repos/mcuadros/go-version/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcuadros/go-version/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcuadros/go-version/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcuadros/go-version/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcuadros/go-version/statuses/{sha}","languages_url":"https://api.github.com/repos/mcuadros/go-version/languages","stargazers_url":"https://api.github.com/repos/mcuadros/go-version/stargazers","contributors_url":"https://api.github.com/repos/mcuadros/go-version/contributors","subscribers_url":"https://api.github.com/repos/mcuadros/go-version/subscribers","subscription_url":"https://api.github.com/repos/mcuadros/go-version/subscription","commits_url":"https://api.github.com/repos/mcuadros/go-version/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcuadros/go-version/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcuadros/go-version/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcuadros/go-version/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcuadros/go-version/contents/{+path}","compare_url":"https://api.github.com/repos/mcuadros/go-version/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcuadros/go-version/merges","archive_url":"https://api.github.com/repos/mcuadros/go-version/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcuadros/go-version/downloads","issues_url":"https://api.github.com/repos/mcuadros/go-version/issues{/number}","pulls_url":"https://api.github.com/repos/mcuadros/go-version/pulls{/number}","milestones_url":"https://api.github.com/repos/mcuadros/go-version/milestones{/number}","notifications_url":"https://api.github.com/repos/mcuadros/go-version/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcuadros/go-version/labels{/name}","releases_url":"https://api.github.com/repos/mcuadros/go-version/releases{/id}","deployments_url":"https://api.github.com/repos/mcuadros/go-version/deployments","created_at":"2013-04-24T21:37:50Z","updated_at":"2018-05-24T18:18:13Z","pushed_at":"2017-10-03T09:47:17Z","git_url":"git://github.com/mcuadros/go-version.git","ssh_url":"git@github.com:mcuadros/go-version.git","clone_url":"https://github.com/mcuadros/go-version.git","svn_url":"https://github.com/mcuadros/go-version","homepage":null,"size":33,"stargazers_count":75,"watchers_count":75,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":14,"open_issues":1,"watchers":75,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mcuadros/go-version/pulls/5"},"html":{"href":"https://github.com/mcuadros/go-version/pull/5"},"issue":{"href":"https://api.github.com/repos/mcuadros/go-version/issues/5"},"comments":{"href":"https://api.github.com/repos/mcuadros/go-version/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/mcuadros/go-version/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/mcuadros/go-version/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mcuadros/go-version/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/mcuadros/go-version/statuses/3ce6bf0b41a137c16deacd4b93dfa12b31df1f80"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":35,"deletions":4,"changed_files":3}}
{"actor":{"display_login":"pkumza"}}