{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/923","repository_url":"https://api.github.com/repos/bazelbuild/bazel","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/923/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/923/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/923/events","html_url":"https://github.com/bazelbuild/bazel/issues/923","id":134395354,"number":923,"title":"Touching BUILD and WORKSPACE slows down the build","user":{"login":"dfabulich","id":96150,"avatar_url":"https://avatars.githubusercontent.com/u/96150?v=3","gravatar_id":"","url":"https://api.github.com/users/dfabulich","html_url":"https://github.com/dfabulich","followers_url":"https://api.github.com/users/dfabulich/followers","following_url":"https://api.github.com/users/dfabulich/following{/other_user}","gists_url":"https://api.github.com/users/dfabulich/gists{/gist_id}","starred_url":"https://api.github.com/users/dfabulich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfabulich/subscriptions","organizations_url":"https://api.github.com/users/dfabulich/orgs","repos_url":"https://api.github.com/users/dfabulich/repos","events_url":"https://api.github.com/users/dfabulich/events{/privacy}","received_events_url":"https://api.github.com/users/dfabulich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bazelbuild/bazel/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/bazelbuild/bazel/labels/P2","name":"P2","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-17T20:48:08Z","updated_at":"2016-02-18T09:53:41Z","closed_at":null,"body":"https://groups.google.com/forum/#!topic/bazel-discuss/0NFvo8O9vOQ\r\n\r\nWhile we're transitioning to Bazel, we're automatically generating our BUILD and WORKSPACE files from other sources.\r\n\r\nI'm a bit surprised to see that the Bazel build gets a lot slower when we regenerate/touch the BUILD/WORKSPACE files, even when the files themselves are unchanged.\r\n\r\nIn this example: https://github.com/dfabulich/touch-build a clean build takes 11s, and rebuilding takes 0.2s, but if I touch BUILD it takes 1.5s, and if I touch WORKSPACE it takes 3.3s.\r\n\r\n```\r\n$ bazel clean\r\nINFO: Starting clean (this may take a while). Consider using --expunge_async if the clean takes more than several minutes.\r\n$ bazel build //:x\r\nINFO: Found 1 target...\r\nTarget //:x up-to-date:\r\n  bazel-bin/libx.jar\r\nINFO: Elapsed time: 11.058s, Critical Path: 7.72s\r\n$ bazel build //:x\r\nINFO: Found 1 target...\r\nTarget //:x up-to-date:\r\n  bazel-bin/libx.jar\r\nINFO: Elapsed time: 0.167s, Critical Path: 0.00s\r\n$ bazel build //:x\r\nINFO: Found 1 target...\r\nTarget //:x up-to-date:\r\n  bazel-bin/libx.jar\r\nINFO: Elapsed time: 0.153s, Critical Path: 0.00s\r\n$ touch BUILD\r\n$ bazel build //:x\r\nINFO: Found 1 target...\r\nTarget //:x up-to-date:\r\n  bazel-bin/libx.jar\r\nINFO: Elapsed time: 1.546s, Critical Path: 0.19s\r\n$ touch BUILD\r\n$ bazel build //:x\r\nINFO: Found 1 target...\r\nTarget //:x up-to-date:\r\n  bazel-bin/libx.jar\r\nINFO: Elapsed time: 1.562s, Critical Path: 0.19s\r\n$ touch WORKSPACE\r\n$ bazel build //:x\r\nINFO: Found 1 target...\r\nTarget //:x up-to-date:\r\n  bazel-bin/libx.jar\r\nINFO: Elapsed time: 3.281s, Critical Path: 1.75s\r\n$ touch WORKSPACE\r\n$ bazel build //:x\r\nINFO: Found 1 target...\r\nTarget //:x up-to-date:\r\n  bazel-bin/libx.jar\r\nINFO: Elapsed time: 3.296s, Critical Path: 0.23s\r\n```"},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/comments/185633033","html_url":"https://github.com/bazelbuild/bazel/issues/923#issuecomment-185633033","issue_url":"https://api.github.com/repos/bazelbuild/bazel/issues/923","id":185633033,"user":{"login":"damienmg","id":3721087,"avatar_url":"https://avatars.githubusercontent.com/u/3721087?v=3","gravatar_id":"","url":"https://api.github.com/users/damienmg","html_url":"https://github.com/damienmg","followers_url":"https://api.github.com/users/damienmg/followers","following_url":"https://api.github.com/users/damienmg/following{/other_user}","gists_url":"https://api.github.com/users/damienmg/gists{/gist_id}","starred_url":"https://api.github.com/users/damienmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damienmg/subscriptions","organizations_url":"https://api.github.com/users/damienmg/orgs","repos_url":"https://api.github.com/users/damienmg/repos","events_url":"https://api.github.com/users/damienmg/events{/privacy}","received_events_url":"https://api.github.com/users/damienmg/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T09:53:41Z","updated_at":"2016-02-18T09:53:41Z","body":"@haxorz @laurentlb Skylark seems slow, Skyframe eval too... Is there a way to know which skyfunction got called?"}}