{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/10185","repository_url":"https://api.github.com/repos/meteor/meteor","labels_url":"https://api.github.com/repos/meteor/meteor/issues/10185/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/10185/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/10185/events","html_url":"https://github.com/meteor/meteor/issues/10185","id":355021363,"node_id":"MDU6SXNzdWUzNTUwMjEzNjM=","number":10185,"title":"Extremely long build and rebuild times (80 seconds)","user":{"login":"houshuang","id":61575,"node_id":"MDQ6VXNlcjYxNTc1","avatar_url":"https://avatars1.githubusercontent.com/u/61575?v=4","gravatar_id":"","url":"https://api.github.com/users/houshuang","html_url":"https://github.com/houshuang","followers_url":"https://api.github.com/users/houshuang/followers","following_url":"https://api.github.com/users/houshuang/following{/other_user}","gists_url":"https://api.github.com/users/houshuang/gists{/gist_id}","starred_url":"https://api.github.com/users/houshuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houshuang/subscriptions","organizations_url":"https://api.github.com/users/houshuang/orgs","repos_url":"https://api.github.com/users/houshuang/repos","events_url":"https://api.github.com/users/houshuang/events{/privacy}","received_events_url":"https://api.github.com/users/houshuang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-29T06:51:33Z","updated_at":"2018-09-10T21:50:24Z","closed_at":null,"author_association":"NONE","body":"METEOR@1.7.1-beta.31, Mac OSX 10.12.16\r\n\r\nAs always I apologize for the complexity of our repo. We have a main Meteor app, and a bunch of different plugins. I have experimented with how we include these in the Meteor app, and we're now trying the babel-macro importAll to automatically import packages based on a path regexp. These imports are all cached, to the point that we have to forcibly delete the cache when we add a new package. We have also switched to having Meteor build all of our external packages by symlinking them to the imports/packages directory, which reduces conflicts between Meteor and external Babel versions, etc.\r\n\r\nHowever, build times have increased hugely. I'm not sure if it is having Meteor build our packages, the importAll macro, or new Meteor versions, but it seems to spend a huge amount of time analyzing imports. The biggest problem for us is the rebuild times - in [this gist](https://gist.github.com/houshuang/bb15fe117f8c663e39f328e0434c610f) you see that the initial build takes 87 seconds (this is after having run the server before, so there is already a cache). However, even worse is that just changing a single line in a core app file leads to a rebuild that takes 59 seconds! (I also keep getting messages about delayed legacy builds that take 40-60 seconds). Is there something about our setup that leads to the cache not being useful or is there anything we can do, this is really crippling our development workflow.\r\n\r\nFor comparison, a [gist](https://gist.github.com/houshuang/aa1dc54521477497f7c7fe8c5cf83503) of a build process where I removed all of our plugins - with a very normal build speed. Of course this also means removing thousands of lines of code, but the point is that for the rebuild this shouldn't make a difference, since I didn't touch a single of those lines of code in my edit...\r\n\r\nOur repo is https://github.com/chili-epfl/FROG. Checkout, run ./initial_setup.sh (just yarn plus symlinking node_modules to the meteor directory), go to frog, and run meteor."},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/420073063","html_url":"https://github.com/meteor/meteor/issues/10185#issuecomment-420073063","issue_url":"https://api.github.com/repos/meteor/meteor/issues/10185","id":420073063,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDA3MzA2Mw==","user":{"login":"benjamn","id":5750,"node_id":"MDQ6VXNlcjU3NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/5750?v=4","gravatar_id":"","url":"https://api.github.com/users/benjamn","html_url":"https://github.com/benjamn","followers_url":"https://api.github.com/users/benjamn/followers","following_url":"https://api.github.com/users/benjamn/following{/other_user}","gists_url":"https://api.github.com/users/benjamn/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamn/subscriptions","organizations_url":"https://api.github.com/users/benjamn/orgs","repos_url":"https://api.github.com/users/benjamn/repos","events_url":"https://api.github.com/users/benjamn/events{/privacy}","received_events_url":"https://api.github.com/users/benjamn/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T21:50:24Z","updated_at":"2018-09-10T21:50:24Z","author_association":"MEMBER","body":"I don't have any great news on the initial build front, but if you update your app to the latest 1.7.1 release candidate, I think you'll be much happier with your rebuild times:\r\n```bash\r\nmeteor update --release 1.7.1-rc.9\r\n```\r\nWhen I run your app with `METEOR_PROFILE=20 meteor run`, rebuild times are down from 24-25 seconds to 4-5 seconds. Initial build times are about 60 seconds, which is a little better than before.\r\n\r\nHere's the main commit responsible for this improvement: https://github.com/meteor/meteor/pull/9942/commits/881390c553f641d71ee6c4393f07e2057178eeec"}}
{"actor":{"display_login":"benjamn"}}