Title: @ngtools/webpack / ngc - 4x slower aot compilation from ng6 to ng7 · Issue #26674 · angular/angular · GitHub
Open Graph Title: @ngtools/webpack / ngc - 4x slower aot compilation from ng6 to ng7 · Issue #26674 · angular/angular
X Title: @ngtools/webpack / ngc - 4x slower aot compilation from ng6 to ng7 · Issue #26674 · angular/angular
Description: I'm submitting a... [x] Regression (a behavior that used to work and stopped working in a new release) [x] Performance issue Current behavior webpack incremental build with angular 7 takes ~30 seconds in angular 6 it was ~10 seconds pack...
Open Graph Description: I'm submitting a... [x] Regression (a behavior that used to work and stopped working in a new release) [x] Performance issue Current behavior webpack incremental build with angular 7 takes ~30 seco...
X Description: I'm submitting a... [x] Regression (a behavior that used to work and stopped working in a new release) [x] Performance issue Current behavior webpack incremental build with angular 7 takes ~30 ...
Opengraph URL: https://github.com/angular/angular/issues/26674
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@ngtools/webpack / ngc - 4x slower aot compilation from ng6 to ng7","articleBody":"## I'm submitting a...\r\n[x] Regression (a behavior that used to work and stopped working in a new release)\r\n[x] Performance issue\r\n\r\n## Current behavior\r\n\r\nwebpack incremental build with angular 7 takes ~30 seconds\r\nin angular 6 it was ~10 seconds\r\n\r\npackage.json (angular 7.0.0, webpack 4.12)\r\n\r\n```json\r\n{\r\n \"@angular/animations\": \"^7.0.0\",\r\n \"@angular/cli\": \"^7.0.2\",\r\n \"@angular/common\": \"^7.0.0\",\r\n \"@angular/compiler\": \"^7.0.0\",\r\n \"@angular/compiler-cli\": \"^7.0.0\",\r\n \"@angular/core\": \"^7.0.0\",\r\n \"@angular/forms\": \"^7.0.0\",\r\n \"@angular/platform-browser\": \"^7.0.0\",\r\n \"@angular/platform-browser-dynamic\": \"^7.0.0\",\r\n \"@angular/platform-server\": \"^7.0.0\",\r\n \"@angular/router\": \"^7.0.0\",\r\n \"@ngtools/webpack\": \"^7.0.2\",\r\n \"@types/bootstrap\": \"4.1.2\",\r\n \"@types/jest\": \"^23.3.5\",\r\n \"@types/jquery\": \"^3.3.21\",\r\n \"@types/js-yaml\": \"^3.11.2\",\r\n \"@types/lodash\": \"4.14.117\",\r\n \"@types/node\": \"10.12.0\",\r\n \"@types/reflect-metadata\": \"0.1.0\",\r\n \"@types/webpack\": \"^4.4.17\",\r\n \"@types/webpack-env\": \"^1.13.6\",\r\n \"autoprefixer\": \"9.2.1\",\r\n \"bootstrap-sass\": \"3.3.7\",\r\n \"circular-dependency-plugin\": \"^5.0.2\",\r\n \"core-js\": \"2.5.7\",\r\n \"css-loader\": \"1.0.0\",\r\n \"file-loader\": \"^2.0.0\",\r\n \"ismobilejs\": \"0.4.1\",\r\n \"jquery\": \"3.3.1\",\r\n \"loader-utils\": \"1.1.0\",\r\n \"lodash\": \"4.17.11\",\r\n \"mini-css-extract-plugin\": \"^0.4.4\",\r\n \"moment\": \"2.22.2\",\r\n \"node-sass\": \"4.9.4\",\r\n \"postcss-loader\": \"3.0.0\",\r\n \"postcss-raw\": \"0.1.2\",\r\n \"postcss-scopify\": \"0.1.9\",\r\n \"postcss-url\": \"^8.0.0\",\r\n \"raven-js\": \"^3.27.0\",\r\n \"rimraf\": \"2.6.2\",\r\n \"rxjs\": \"^6.3.3\",\r\n \"rxjs-compat\": \"^6.3.3\",\r\n \"sass-loader\": \"7.1.0\",\r\n \"sync-p\": \"1.1.5\",\r\n \"ts-node\": \"^7.0.1\",\r\n \"tslib\": \"^1.9.3\",\r\n \"typescript\": \"^3.1.3\",\r\n \"webpack\": \"^4.22.0\",\r\n \"webpack-cli\": \"^3.1.2\",\r\n \"webpack-merge\": \"^4.1.4\",\r\n \"webpack-sources\": \"^1.3.0\",\r\n \"webpack-uglify-parallel\": \"0.1.4\",\r\n \"zone.js\": \"^0.8.26\"\r\n}\r\n```\r\n\r\nIt seems like typescript needs a lot of time for something:\r\n\r\n[CPU-20181023T113903.cpuprofile.zip](https://github.com/angular/angular/files/2505608/CPU-20181023T113903.cpuprofile.zip)\r\n\r\n\r\n\r\n\r\n\r\n```bash\r\nAngularCompilerPlugin._createOrUpdateProgram.ng.loadNgStructureAsync: 25729.967ms\r\nAngularCompilerPlugin._emit.ng.getNgStructuralDiagnostics: 0.010ms\r\nAngularCompilerPlugin._emit.ng.emit: 1930.130ms\r\nAngularCompilerPlugin._emit: 1930.281ms\r\nAngularCompilerPlugin._update._emit: 1930.317ms\r\nAngularCompilerPlugin._update: 27720.982ms\r\nAngularCompilerPlugin._make: 27721.017ms\r\n```\r\n\r\nI observe the same behavior when running `ngc` directly instead of webpack.\r\nIf i use `tsc` to compile the project, that watch/rebuild takes ~1second.\r\n\r\n## Expected behavior\r\nfaster incremental build\r\n\r\n## Minimal reproduction of the problem with instructions\r\nCan't share the repo, but if this ticket isn't sufficient, maybe I can strip down the project.\r\n\r\n## Environment\r\nAngular version: 7.0.0\r\n\r\nFor Tooling issues:\r\n- Node version: v8.12.0\r\n- Platform: macOS 10.13.6","author":{"url":"https://github.com/sod","@type":"Person","name":"sod"},"datePublished":"2018-10-23T10:01:15Z","url":"https://github.com/angular/angular/issues/26674"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a1c12114-78b7-339f-eb32-ca3ac421c92b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9486:E9D16:8EB6E2:B4A566:6B012303 |
| html-safe-nonce | 79f41ead6a170f9969b217f85e6bb7b5126b202038a97b4900d3dfd2c0de62a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NDg2OkU5RDE2OjhFQjZFMjpCNEE1NjY6NkIwMTIzMDMiLCJ2aXNpdG9yX2lkIjoiNTA2MTYyOTA0MDQxOTQ4MDMyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fd9ed7823e29f9d35d484cbea111d481ae021353a28b6ebbc2e236852845e85c |
| hovercard-subject-tag | issue:372915108 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/26674/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f5555a41444a753d0c3e0e020d83431b545e8f304dbc4f01201c6e5ebd814c7e/angular/angular/issues/26674 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f5555a41444a753d0c3e0e020d83431b545e8f304dbc4f01201c6e5ebd814c7e/angular/angular/issues/26674 |
| og:image:alt | I'm submitting a... [x] Regression (a behavior that used to work and stopped working in a new release) [x] Performance issue Current behavior webpack incremental build with angular 7 takes ~30 seco... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sod |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width