{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/6795","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/6795/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/6795/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/6795/events","html_url":"https://github.com/angular/angular-cli/issues/6795","id":238293894,"node_id":"MDU6SXNzdWUyMzgyOTM4OTQ=","number":6795,"title":"Build with \"ng -prod\" is extremely slow","user":{"login":"ankeshdave","id":1351658,"node_id":"MDQ6VXNlcjEzNTE2NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/1351658?v=4","gravatar_id":"","url":"https://api.github.com/users/ankeshdave","html_url":"https://github.com/ankeshdave","followers_url":"https://api.github.com/users/ankeshdave/followers","following_url":"https://api.github.com/users/ankeshdave/following{/other_user}","gists_url":"https://api.github.com/users/ankeshdave/gists{/gist_id}","starred_url":"https://api.github.com/users/ankeshdave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankeshdave/subscriptions","organizations_url":"https://api.github.com/users/ankeshdave/orgs","repos_url":"https://api.github.com/users/ankeshdave/repos","events_url":"https://api.github.com/users/ankeshdave/events{/privacy}","received_events_url":"https://api.github.com/users/ankeshdave/received_events","type":"User","site_admin":false},"labels":[{"id":957896443,"node_id":"MDU6TGFiZWw5NTc4OTY0NDM=","url":"https://api.github.com/repos/angular/angular-cli/labels/comp:%20devkit/build-angular","name":"comp: devkit/build-angular","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":140,"created_at":"2017-06-24T04:28:11Z","updated_at":"2018-11-09T06:00:25Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING\r\n-->\r\n### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [ x] bug report -> please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Versions.\r\nng --version\r\n    _                      _                 ____ _     ___\r\n   / \\   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|\r\n  / △ \\ | '_ \\ / _` | | | | |/ _` | '__|   | |   | |    | |\r\n / ___ \\| | | | (_| | |_| | | (_| | |      | |___| |___ | |\r\n/_/   \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_|       \\____|_____|___|\r\n               |___/\r\n@angular/cli: 1.1.0\r\nnode: 7.9.0\r\nos: win32 x64 (Win 10 Enterpirise - 16Gig , i7)\r\n@angular/animations: 4.0.0\r\n@angular/common: 4.0.0\r\n@angular/compiler: 4.0.0\r\n@angular/core: 4.0.0\r\n@angular/forms: 4.0.0\r\n@angular/http: 4.0.0\r\n@angular/platform-browser: 4.0.0\r\n@angular/platform-browser-dynamic: 4.0.0\r\n@angular/router: 4.0.0\r\n@angular/cli: 1.1.0\r\n@angular/compiler-cli: 4.0.0\r\n@angular/language-service: 4.0.0\r\n\r\n\r\n\r\n### Repro steps.\r\n$ ng build --prod --aot=false -ec --sourcemap=false\r\nHash: 552d9867ececa788ac3a\r\nTime: **670222ms**\r\nchunk    {0} polyfills.d77767cee98c83f90386.bundle.js (polyfills) 294 kB {5} [initial] [rendered]\r\nchunk    {1} main.255e1d27fe4d40b56ab2.bundle.js (main) 1.51 MB {4} [initial] [rendered]\r\nchunk    {2} scripts.45a4574f31d7b91e5a5e.bundle.js (scripts) 3.88 MB {5} [initial] [rendered]\r\nchunk    {3} styles.ac17d766c993c4027892.bundle.css (styles) 228 bytes {5} [initial] [rendered]\r\nchunk    {4} vendor.86c029ec4598fb674488.bundle.js (vendor) 8.23 MB [initial] [rendered]\r\nchunk    {5} inline.750f0337ff0a9bee9813.bundle.js (inline) 0 bytes [entry] [rendered]\r\n\r\nng build --aot -ec -sm\r\nHash: 24f744145f250126e699\r\nTime: **62809ms**\r\nchunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 294 kB {5} [initial] [rendered]\r\nchunk    {1} main.bundle.js, main.bundle.js.map (main) 3.07 MB {4} [initial] [rendered]\r\nchunk    {2} scripts.bundle.js, scripts.bundle.js.map (scripts) 3.88 MB {5} [initial] [rendered]\r\nchunk    {3} styles.bundle.css, styles.bundle.css.map (styles) 228 bytes {5} [initial] [rendered]\r\nchunk    {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 7.37 MB [initial] [rendered]\r\nchunk    {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]\r\n\r\n### 670222ms vs 62809ms is a huge difference\r\n\r\n### The log given by the failure.\r\nThere is no failure , the build takes a very long time to complete its stuck at \r\n` 92% chunk asset optimization` and then we have to wait for 10-15 mins to get the build completed.\r\nI have disabled aot and sourcemaps, still the speed is very slow.\r\n\r\n### Desired functionality.\r\nbuild should have similar time that to of `ng build -aot`\r\n\r\nAny help and guidance to reduce will be helpful. "},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/437259256","html_url":"https://github.com/angular/angular-cli/issues/6795#issuecomment-437259256","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/6795","id":437259256,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzI1OTI1Ng==","user":{"login":"negberts","id":20299260,"node_id":"MDQ6VXNlcjIwMjk5MjYw","avatar_url":"https://avatars2.githubusercontent.com/u/20299260?v=4","gravatar_id":"","url":"https://api.github.com/users/negberts","html_url":"https://github.com/negberts","followers_url":"https://api.github.com/users/negberts/followers","following_url":"https://api.github.com/users/negberts/following{/other_user}","gists_url":"https://api.github.com/users/negberts/gists{/gist_id}","starred_url":"https://api.github.com/users/negberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/negberts/subscriptions","organizations_url":"https://api.github.com/users/negberts/orgs","repos_url":"https://api.github.com/users/negberts/repos","events_url":"https://api.github.com/users/negberts/events{/privacy}","received_events_url":"https://api.github.com/users/negberts/received_events","type":"User","site_admin":false},"created_at":"2018-11-09T06:00:25Z","updated_at":"2018-11-09T06:00:25Z","author_association":"NONE","body":"Our build with these parameters (ng build --prod --aot=false --optimization=true  --sourceMap=false --buildOptimizer=false) creates 71 bundles in just over 2 minutes with a total size of 11MB for all bundles.\r\n\r\nNow we turn the --aot flag to true and what happens?? The build takes about 43 minutes, comes up with 84 bundles and has a total size of 22MB???? Isn't AOT supposed to minimize the size by excluding what is not being used? But instead it takes 41 minutes to create twice as many code? What's going on here?"}}
{"actor":{"display_login":"negberts"}}