angular-cn/integration/ngcc
George Kalpakas e36e6c85ef perf(ngcc): process tasks in parallel in async mode (#32427)
`ngcc` supports both synchronous and asynchronous execution. The default
mode when using `ngcc` programmatically (which is how `@angular/cli` is
using it) is synchronous. When running `ngcc` from the command line
(i.e. via the `ivy-ngcc` script), it runs in async mode.

Previously, the work would be executed in the same way in both modes.

This commit improves the performance of `ngcc` in async mode by
processing tasks in parallel on multiple processes. It uses the Node.js
built-in [`cluster` module](https://nodejs.org/api/cluster.html) to
launch a cluster of Node.js processes and take advantage of multi-core
systems.

Preliminary comparisons indicate a 1.8x to 2.6x speed improvement when
processing the angular.io app (apparently depending on the OS, number of
available cores, system load, etc.). Further investigation is needed to
better understand these numbers and identify potential areas of
improvement.

Inspired by/Based on @alxhub's prototype: alxhub/angular@cb631bdb1
Original design doc: https://hackmd.io/uYG9CJrFQZ-6FtKqpnYJAA?view

Jira issue: [FW-1460](https://angular-team.atlassian.net/browse/FW-1460)

PR Close #32427
2019-09-09 15:55:13 -04:00
..
src test(ivy): ngcc - test compiling the Angular Material library (#26403) 2018-11-01 14:13:26 -07:00
debug-test.sh test(ivy): ngcc - test compiling the Angular Material library (#26403) 2018-11-01 14:13:26 -07:00
package.json fix(ivy): ngcc should process undecorated base classes (#30821) 2019-06-11 00:19:34 +00:00
test.sh perf(ngcc): process tasks in parallel in async mode (#32427) 2019-09-09 15:55:13 -04:00
tsconfig-app.json test(ivy): add an integration test for ngcc (#25406) 2018-08-22 19:28:56 -04:00
yarn.lock build(zone.js): update zone.js to 0.10.2 (#31975) 2019-08-16 09:56:41 -07:00