{"action":"created","issue":{"url":"https://api.github.com/repos/heresydev/email_guard/issues/1","repository_url":"https://api.github.com/repos/heresydev/email_guard","labels_url":"https://api.github.com/repos/heresydev/email_guard/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/heresydev/email_guard/issues/1/comments","events_url":"https://api.github.com/repos/heresydev/email_guard/issues/1/events","html_url":"https://github.com/heresydev/email_guard/pull/1","id":315135628,"number":1,"title":"Performance improvements","user":{"login":"idi-ot","id":28607052,"avatar_url":"https://avatars3.githubusercontent.com/u/28607052?v=4","gravatar_id":"","url":"https://api.github.com/users/idi-ot","html_url":"https://github.com/idi-ot","followers_url":"https://api.github.com/users/idi-ot/followers","following_url":"https://api.github.com/users/idi-ot/following{/other_user}","gists_url":"https://api.github.com/users/idi-ot/gists{/gist_id}","starred_url":"https://api.github.com/users/idi-ot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idi-ot/subscriptions","organizations_url":"https://api.github.com/users/idi-ot/orgs","repos_url":"https://api.github.com/users/idi-ot/repos","events_url":"https://api.github.com/users/idi-ot/events{/privacy}","received_events_url":"https://api.github.com/users/idi-ot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-04-17T16:23:32Z","updated_at":"2018-04-18T02:04:04Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/heresydev/email_guard/pulls/1","html_url":"https://github.com/heresydev/email_guard/pull/1","diff_url":"https://github.com/heresydev/email_guard/pull/1.diff","patch_url":"https://github.com/heresydev/email_guard/pull/1.patch"},"body":"👋\r\n\r\nShould probably use benchee but\r\n\r\nCurrent implementation\r\n```elixir\r\niex(1)> :timer.tc fn -> EmailGuard.check(\"aksdjfhg@gmail.com\") end\r\n{122, :ok}\r\niex(2)> :timer.tc fn -> EmailGuard.check(\"aksdjfhg@gmail.com\") end\r\n{68, :ok}\r\niex(3)> :timer.tc fn -> EmailGuard.check(\"aksdjfhg@gmail.com\") end\r\n{69, :ok}\r\n```\r\n\r\nThis PR\r\n```elixir\r\niex(1)> :timer.tc fn -> EmailGuard.check(\"aksdjfhg@gmail.com\") end\r\n{13, :ok}\r\niex(2)> :timer.tc fn -> EmailGuard.check(\"aksdjfhg@gmail.com\") end\r\n{12, :ok}\r\niex(3)> :timer.tc fn -> EmailGuard.check(\"aksdjfhg@gmail.com\") end\r\n{14, :ok}\r\n```\r\n\r\nCan probably be optimized further ... I had a library of \"bad\" words, and lookups there took ~4us.\r\n\r\n---\r\n\r\n```elixir\r\n  \"../../priv/disposable_list.txt\"\r\n  |> File.stream!()\r\n  |> Stream.map(&String.trim/1)\r\n  |> Stream.filter(&match?(\"\", &1))\r\n  |> Enum.map(fn domain ->\r\n    def lookup(unquote(domain)), do: \"DisposableList\"\r\n  end)\r\n```\r\nfor each list can be replaced with a macro.\r\n\r\n```elixir\r\ndefmodule EmailGuard.DisposableList do\r\n  use List, list_path: \"../../priv/...\"\r\nend\r\n```\r\n\r\nSo that we would need to provide just the path to the file with \"bad\" domains."},"comment":{"url":"https://api.github.com/repos/heresydev/email_guard/issues/comments/382222117","html_url":"https://github.com/heresydev/email_guard/pull/1#issuecomment-382222117","issue_url":"https://api.github.com/repos/heresydev/email_guard/issues/1","id":382222117,"user":{"login":"Un3qual","id":6117075,"avatar_url":"https://avatars0.githubusercontent.com/u/6117075?v=4","gravatar_id":"","url":"https://api.github.com/users/Un3qual","html_url":"https://github.com/Un3qual","followers_url":"https://api.github.com/users/Un3qual/followers","following_url":"https://api.github.com/users/Un3qual/following{/other_user}","gists_url":"https://api.github.com/users/Un3qual/gists{/gist_id}","starred_url":"https://api.github.com/users/Un3qual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Un3qual/subscriptions","organizations_url":"https://api.github.com/users/Un3qual/orgs","repos_url":"https://api.github.com/users/Un3qual/repos","events_url":"https://api.github.com/users/Un3qual/events{/privacy}","received_events_url":"https://api.github.com/users/Un3qual/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T02:04:04Z","updated_at":"2018-04-18T02:04:04Z","author_association":"NONE","body":"Any chance using `Flow` would worth using to increase performance?"}}
{"actor":{"display_login":"Un3qual"}}