Title: 1.5 AOT by default performance tracking issue · Issue #8259 · angular/angular-cli · GitHub
Open Graph Title: 1.5 AOT by default performance tracking issue · Issue #8259 · angular/angular-cli
X Title: 1.5 AOT by default performance tracking issue · Issue #8259 · angular/angular-cli
Description: Heya all, When using Angular CLI 1.5 together with Angular 5.0.0, ng serve will default to using --aot=true. We added a new pipeline that should make AOT compilation much faster than it was with older CLI and Angular versions so we felt ...
Open Graph Description: Heya all, When using Angular CLI 1.5 together with Angular 5.0.0, ng serve will default to using --aot=true. We added a new pipeline that should make AOT compilation much faster than it was with ol...
X Description: Heya all, When using Angular CLI 1.5 together with Angular 5.0.0, ng serve will default to using --aot=true. We added a new pipeline that should make AOT compilation much faster than it was with ol...
Opengraph URL: https://github.com/angular/angular-cli/issues/8259
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"1.5 AOT by default performance tracking issue","articleBody":"Heya all,\r\n\r\nWhen using Angular CLI 1.5 together with Angular 5.0.0, `ng serve` will default to using `--aot=true`. We added a new pipeline that should make AOT compilation much faster than it was with older CLI and Angular versions so we felt confident that AOT rebuild speeds should be much better.\r\n\r\nBigger projects can still have slow AOT rebuilds though. You can disable AOT by passing on the `--no-aot` (or `--aot=false`) flag, but if you have time I'd also like to ask for your help debugging remaining bottlenecks.\r\n\r\nA good way to figure out how time is being spent in a rebuild is via CPU profiles. These show what functions are being called and how much time is being spent in each function.\r\n\r\nThis is how you can capture a CPU profile and share it here:\r\n- Make sure your project is using the following dependencies:\r\n - At least `@angular/cli@1.5.0-rc.8`.\r\n - At least `@angular/core@5.0.0-rc.9`, together with other `@angular/*` packages.\r\n - At least `rxjs@5.5.2`. \r\n - Exactly `typescript@2.4.2`, newer versions might work but this is the latest officially supported by `@angular/compiler-cli`.\r\n- Open `chrome://inspect/#devices` in chrome, and then click `Open dedicated DevTools for Node`. This will give you a window called `Developer Tools - Node.js` that we'll get back to in a second.\r\n- In your `package.json`, add the following NPM script:\r\n - `\"debug\": \"node--max_old_space_size=8192 --inspect --debug-brk ./node_modules/@angular/cli/bin/ng serve\"`\r\n - This script tells node to start Angular CLI with the node debugger, and also to raise the maximum memory limit.\r\n- Run `npm run debug`.\r\n- The `Open dedicated DevTools for Node` window should pop up. It is stopped on the very first line of Angular CLI. Click the `Resume` button in the upper left corner of that window:\r\n\r\n- Wait until the initial build is finalized.\r\n- Open your apps `main.ts` file, add `console.log(1);` to the end of it and save. Do this 3 times.\r\n - Saving a file without code changes won't trigger trigger a real rebuild, we have to actually change code like adding a `console.log`.\r\n - The first few rebuilds can take longer than others, so we ignore them.\r\n- Now we will capture the CPU profile of a rebuild:\r\n - Go back to the `Open dedicated DevTools for Node` window.\r\n - Click the right-most tab, called `Profiler`.\r\n - Click `Start`.\r\n - Add another `console.log(1);` to `main.ts` and save it.\r\n - Wait until the rebuild finishes.\r\n - Click the `Stop` button in the profiler tab.\r\n - Wait until `Profile 1` shows up on the left, and then click it (opening it can take some time for big projects).\r\n- You should see a chart. Zoom into it until you get all of it in the screen, take a screenshot and post it here. \r\n - If you don't see a chart, click the dropdown beneath `Profiler` and select `Chart` from there.\r\n\r\n\r\n - This is how it looks like for a new project:\r\n\r\n- Right click `Profile 1`, click `Save`. Upload it somewhere and link it here.\r\n - I uploaded it to google drive: https://drive.google.com/open?id=0B06an8Bxmi7URXhhRzMxLWpPQmM \r\n\r\nThen I can look at the CPU profile and see where time is being spent on your rebuild. Hopefully I can find new bottlenecks and make your builds faster.\r\n\r\nNote: Sometimes the debugger doesn't disconnect after you quit the `ng serve` process. If you have to do this process more than once and get `Unable to open devtools socket: address already in use` when running `npm run debug`, open your process manager and kill any existing `Node.js` processes.\r\n\r\n ","author":{"url":"https://github.com/filipesilva","@type":"Person","name":"filipesilva"},"datePublished":"2017-10-31T10:32:08Z","url":"https://github.com/angular/angular-cli/issues/8259"}
| 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:461abbbb-ff03-03d1-ef9d-40d22173c14c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB18:1DC4CC:88A180:B65D05:6B01B26C |
| html-safe-nonce | 2d5a5213f879f9d2701a85116fef99641ff1f9ecc85ccd36de7fd4922b78156c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjE4OjFEQzRDQzo4OEExODA6QjY1RDA1OjZCMDFCMjZDIiwidmlzaXRvcl9pZCI6Ijc3NzYzMjM0NjQxNDY4MjU4MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 44d9f203003ad3a33c21b9f3f26213235d131172727d6802cf265023bdeffccf |
| hovercard-subject-tag | issue:269908550 |
| 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-cli/8259/issue_layout |
| twitter:image | https://opengraph.githubassets.com/103ae638b286d4be4c12ec2bf1b12fdb095c3da61820e968d6c926b24d0aa230/angular/angular-cli/issues/8259 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/103ae638b286d4be4c12ec2bf1b12fdb095c3da61820e968d6c926b24d0aa230/angular/angular-cli/issues/8259 |
| og:image:alt | Heya all, When using Angular CLI 1.5 together with Angular 5.0.0, ng serve will default to using --aot=true. We added a new pipeline that should make AOT compilation much faster than it was with ol... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | filipesilva |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| 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