{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/4993","repository_url":"https://api.github.com/repos/elixir-lang/elixir","labels_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4993/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4993/comments","events_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4993/events","html_url":"https://github.com/elixir-lang/elixir/issues/4993","id":164856028,"number":4993,"title":"Compiling is very slow on filesystems with slow directory access","user":{"login":"martin-langhoff","id":5116932,"avatar_url":"https://avatars.githubusercontent.com/u/5116932?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-langhoff","html_url":"https://github.com/martin-langhoff","followers_url":"https://api.github.com/users/martin-langhoff/followers","following_url":"https://api.github.com/users/martin-langhoff/following{/other_user}","gists_url":"https://api.github.com/users/martin-langhoff/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-langhoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-langhoff/subscriptions","organizations_url":"https://api.github.com/users/martin-langhoff/orgs","repos_url":"https://api.github.com/users/martin-langhoff/repos","events_url":"https://api.github.com/users/martin-langhoff/events{/privacy}","received_events_url":"https://api.github.com/users/martin-langhoff/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elixir-lang/elixir/labels/App:Mix","name":"App:Mix","color":"CCCCCC"},{"url":"https://api.github.com/repos/elixir-lang/elixir/labels/Kind:Bug","name":"Kind:Bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-07-11T14:49:36Z","updated_at":"2016-07-17T19:57:01Z","closed_at":null,"body":"When compiling over a FS that has slow `open()`, `stat()` and company, builds are painfully slow. This affects builds over NFS and `vboxsf` (VirtualBox, often under Vagrant).\r\n\r\nAn initial rookie diagnosis: stracing the build (with `-e trace=file`) shows each directory and file path is hit many times with `open()`, `openat()`, `stat()`, etc. A quick read of `lib/compilers/elixir.ex` and `mix/utils.ex` leads me to suspect initially of `Mix.Utils.extract_*`. The logic flow leads to many queries to the OS about the same file path.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elixir-lang/elixir/issues/comments/233200638","html_url":"https://github.com/elixir-lang/elixir/issues/4993#issuecomment-233200638","issue_url":"https://api.github.com/repos/elixir-lang/elixir/issues/4993","id":233200638,"user":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"created_at":"2016-07-17T19:57:01Z","updated_at":"2016-07-17T19:57:01Z","body":"@antipax I would like first to see which stat operations are happening in access. For example, it is very likely we are stat-ing the `Mix.Project.config_files` multiple times through the compilers and those are straight-forward to cache in \"compile\" and then delete the cache after the compilers ran. However, for the other ones, different solutions may be required. Sometimes the cache can be a map in the task itself, which is easy because we don't need to worry about invalidation."}}
{"actor":{"display_login":"josevalim"}}