angular-cn/packages/compiler-cli/ngcc/test/dependencies
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
..
commonjs_dependency_host_spec.ts fix(ivy): ngcc - resolve `main` property paths correctly (#31509) 2019-07-12 11:37:35 -04:00
dependency_resolver_spec.ts perf(ngcc): process tasks in parallel in async mode (#32427) 2019-09-09 15:55:13 -04:00
esm_dependency_host_spec.ts fix(ivy): ngcc - resolve `main` property paths correctly (#31509) 2019-07-12 11:37:35 -04:00
module_resolver_spec.ts fix(ngcc): handle deep imports that already have an extension (#32181) 2019-08-19 10:12:03 -07:00
umd_dependency_host_spec.ts fix(ivy): ngcc - resolve `main` property paths correctly (#31509) 2019-07-12 11:37:35 -04:00