{"action":"opened","number":8028,"pull_request":{"url":"https://api.github.com/repos/elixir-lang/elixir/pulls/8028","id":205622476,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NjIyNDc2","html_url":"https://github.com/elixir-lang/elixir/pull/8028","diff_url":"https://github.com/elixir-lang/elixir/pull/8028.diff","patch_url":"https://github.com/elixir-lang/elixir/pull/8028.patch","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/8028","number":8028,"state":"open","locked":false,"title":"Improve performance of File.exists?/1","user":{"login":"mbuhot","id":336840,"node_id":"MDQ6VXNlcjMzNjg0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/336840?v=4","gravatar_id":"","url":"https://api.github.com/users/mbuhot","html_url":"https://github.com/mbuhot","followers_url":"https://api.github.com/users/mbuhot/followers","following_url":"https://api.github.com/users/mbuhot/following{/other_user}","gists_url":"https://api.github.com/users/mbuhot/gists{/gist_id}","starred_url":"https://api.github.com/users/mbuhot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbuhot/subscriptions","organizations_url":"https://api.github.com/users/mbuhot/orgs","repos_url":"https://api.github.com/users/mbuhot/repos","events_url":"https://api.github.com/users/mbuhot/events{/privacy}","received_events_url":"https://api.github.com/users/mbuhot/received_events","type":"User","site_admin":false},"body":"I've hit a situation where I need to call `File.exists?/1` in the inner loop of a bulk text processing application.\r\n\r\nThe erlang docs for [file:read_file_info/2](http://erlang.org/doc/man/file.html#read_file_info-2) suggest two optimizations that can speed up calls to this function:\r\n\r\n> If the option raw is set, the file server is not called and only information about local files is returned. Note that this will break this module's atomicity guarantees as it can race with a concurrent call to write_file_info/1,2\r\n\r\n> As file times are stored in POSIX time on most OS, it is faster to query file information with option posix.\r\n\r\nI noticed a significant speedup when calling `read_file_info/2` with these options.\r\nI'm not sure what are the implications of \"only information about local files is returned\", so maybe that would be a breaking change to `File.exists?/1`.","created_at":"2018-08-02T05:30:52Z","updated_at":"2018-08-02T05:30:52Z","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/elixir-lang/elixir/pulls/8028/commits","review_comments_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/8028/comments","review_comment_url":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/8028/comments","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/764d73c70d0082192339bbc0189490f5583d5bde","head":{"label":"mbuhot:faster-file-exists","ref":"faster-file-exists","sha":"764d73c70d0082192339bbc0189490f5583d5bde","user":{"login":"mbuhot","id":336840,"node_id":"MDQ6VXNlcjMzNjg0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/336840?v=4","gravatar_id":"","url":"https://api.github.com/users/mbuhot","html_url":"https://github.com/mbuhot","followers_url":"https://api.github.com/users/mbuhot/followers","following_url":"https://api.github.com/users/mbuhot/following{/other_user}","gists_url":"https://api.github.com/users/mbuhot/gists{/gist_id}","starred_url":"https://api.github.com/users/mbuhot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbuhot/subscriptions","organizations_url":"https://api.github.com/users/mbuhot/orgs","repos_url":"https://api.github.com/users/mbuhot/repos","events_url":"https://api.github.com/users/mbuhot/events{/privacy}","received_events_url":"https://api.github.com/users/mbuhot/received_events","type":"User","site_admin":false},"repo":{"id":67664636,"node_id":"MDEwOlJlcG9zaXRvcnk2NzY2NDYzNg==","name":"elixir","full_name":"mbuhot/elixir","owner":{"login":"mbuhot","id":336840,"node_id":"MDQ6VXNlcjMzNjg0MA==","avatar_url":"https://avatars3.githubusercontent.com/u/336840?v=4","gravatar_id":"","url":"https://api.github.com/users/mbuhot","html_url":"https://github.com/mbuhot","followers_url":"https://api.github.com/users/mbuhot/followers","following_url":"https://api.github.com/users/mbuhot/following{/other_user}","gists_url":"https://api.github.com/users/mbuhot/gists{/gist_id}","starred_url":"https://api.github.com/users/mbuhot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbuhot/subscriptions","organizations_url":"https://api.github.com/users/mbuhot/orgs","repos_url":"https://api.github.com/users/mbuhot/repos","events_url":"https://api.github.com/users/mbuhot/events{/privacy}","received_events_url":"https://api.github.com/users/mbuhot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbuhot/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":true,"url":"https://api.github.com/repos/mbuhot/elixir","forks_url":"https://api.github.com/repos/mbuhot/elixir/forks","keys_url":"https://api.github.com/repos/mbuhot/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbuhot/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbuhot/elixir/teams","hooks_url":"https://api.github.com/repos/mbuhot/elixir/hooks","issue_events_url":"https://api.github.com/repos/mbuhot/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/mbuhot/elixir/events","assignees_url":"https://api.github.com/repos/mbuhot/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/mbuhot/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/mbuhot/elixir/tags","blobs_url":"https://api.github.com/repos/mbuhot/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbuhot/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbuhot/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbuhot/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbuhot/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/mbuhot/elixir/languages","stargazers_url":"https://api.github.com/repos/mbuhot/elixir/stargazers","contributors_url":"https://api.github.com/repos/mbuhot/elixir/contributors","subscribers_url":"https://api.github.com/repos/mbuhot/elixir/subscribers","subscription_url":"https://api.github.com/repos/mbuhot/elixir/subscription","commits_url":"https://api.github.com/repos/mbuhot/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbuhot/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbuhot/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbuhot/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbuhot/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/mbuhot/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbuhot/elixir/merges","archive_url":"https://api.github.com/repos/mbuhot/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbuhot/elixir/downloads","issues_url":"https://api.github.com/repos/mbuhot/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/mbuhot/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/mbuhot/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/mbuhot/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbuhot/elixir/labels{/name}","releases_url":"https://api.github.com/repos/mbuhot/elixir/releases{/id}","deployments_url":"https://api.github.com/repos/mbuhot/elixir/deployments","created_at":"2016-09-08T03:21:52Z","updated_at":"2016-09-08T03:21:55Z","pushed_at":"2018-08-02T05:17:22Z","git_url":"git://github.com/mbuhot/elixir.git","ssh_url":"git@github.com:mbuhot/elixir.git","clone_url":"https://github.com/mbuhot/elixir.git","svn_url":"https://github.com/mbuhot/elixir","homepage":"http://elixir-lang.org/","size":39026,"stargazers_count":0,"watchers_count":0,"language":"Elixir","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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elixir-lang:master","ref":"master","sha":"f40f21195a62f5c597c37e43e1a5dfff9b204d29","user":{"login":"elixir-lang","id":1481354,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODEzNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":1234714,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM0NzE0","name":"elixir","full_name":"elixir-lang/elixir","owner":{"login":"elixir-lang","id":1481354,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0ODEzNTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1481354?v=4","gravatar_id":"","url":"https://api.github.com/users/elixir-lang","html_url":"https://github.com/elixir-lang","followers_url":"https://api.github.com/users/elixir-lang/followers","following_url":"https://api.github.com/users/elixir-lang/following{/other_user}","gists_url":"https://api.github.com/users/elixir-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/elixir-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elixir-lang/subscriptions","organizations_url":"https://api.github.com/users/elixir-lang/orgs","repos_url":"https://api.github.com/users/elixir-lang/repos","events_url":"https://api.github.com/users/elixir-lang/events{/privacy}","received_events_url":"https://api.github.com/users/elixir-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elixir-lang/elixir","description":"Elixir is a dynamic, functional language designed for building scalable and maintainable applications","fork":false,"url":"https://api.github.com/repos/elixir-lang/elixir","forks_url":"https://api.github.com/repos/elixir-lang/elixir/forks","keys_url":"https://api.github.com/repos/elixir-lang/elixir/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elixir-lang/elixir/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elixir-lang/elixir/teams","hooks_url":"https://api.github.com/repos/elixir-lang/elixir/hooks","issue_events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/events{/number}","events_url":"https://api.github.com/repos/elixir-lang/elixir/events","assignees_url":"https://api.github.com/repos/elixir-lang/elixir/assignees{/user}","branches_url":"https://api.github.com/repos/elixir-lang/elixir/branches{/branch}","tags_url":"https://api.github.com/repos/elixir-lang/elixir/tags","blobs_url":"https://api.github.com/repos/elixir-lang/elixir/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elixir-lang/elixir/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elixir-lang/elixir/git/refs{/sha}","trees_url":"https://api.github.com/repos/elixir-lang/elixir/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elixir-lang/elixir/statuses/{sha}","languages_url":"https://api.github.com/repos/elixir-lang/elixir/languages","stargazers_url":"https://api.github.com/repos/elixir-lang/elixir/stargazers","contributors_url":"https://api.github.com/repos/elixir-lang/elixir/contributors","subscribers_url":"https://api.github.com/repos/elixir-lang/elixir/subscribers","subscription_url":"https://api.github.com/repos/elixir-lang/elixir/subscription","commits_url":"https://api.github.com/repos/elixir-lang/elixir/commits{/sha}","git_commits_url":"https://api.github.com/repos/elixir-lang/elixir/git/commits{/sha}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/comments{/number}","issue_comment_url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments{/number}","contents_url":"https://api.github.com/repos/elixir-lang/elixir/contents/{+path}","compare_url":"https://api.github.com/repos/elixir-lang/elixir/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elixir-lang/elixir/merges","archive_url":"https://api.github.com/repos/elixir-lang/elixir/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elixir-lang/elixir/downloads","issues_url":"https://api.github.com/repos/elixir-lang/elixir/issues{/number}","pulls_url":"https://api.github.com/repos/elixir-lang/elixir/pulls{/number}","milestones_url":"https://api.github.com/repos/elixir-lang/elixir/milestones{/number}","notifications_url":"https://api.github.com/repos/elixir-lang/elixir/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elixir-lang/elixir/labels{/name}","releases_url":"https://api.github.com/repos/elixir-lang/elixir/releases{/id}","deployments_url":"https://api.github.com/repos/elixir-lang/elixir/deployments","created_at":"2011-01-09T08:43:57Z","updated_at":"2018-08-02T05:13:43Z","pushed_at":"2018-08-01T22:59:38Z","git_url":"git://github.com/elixir-lang/elixir.git","ssh_url":"git@github.com:elixir-lang/elixir.git","clone_url":"https://github.com/elixir-lang/elixir.git","svn_url":"https://github.com/elixir-lang/elixir","homepage":"http://elixir-lang.org/","size":37380,"stargazers_count":13515,"watchers_count":13515,"language":"Elixir","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1975,"mirror_url":null,"archived":false,"open_issues_count":28,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1975,"open_issues":28,"watchers":13515,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/8028"},"html":{"href":"https://github.com/elixir-lang/elixir/pull/8028"},"issue":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/8028"},"comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/issues/8028/comments"},"review_comments":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/8028/comments"},"review_comment":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elixir-lang/elixir/pulls/8028/commits"},"statuses":{"href":"https://api.github.com/repos/elixir-lang/elixir/statuses/764d73c70d0082192339bbc0189490f5583d5bde"}},"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":1,"additions":1,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"mbuhot"}}