angular-cn/packages/core
Andrew Kushnir 0a1a989fa9 perf(core): avoid recursive scope recalculation when TestBed.overrideModule is used (#35454)
Currently if TestBed detects that TestBed.overrideModule was used for module X, transitive scopes are recalculated recursively for all modules that X imports and previously calculated data (stored in cache) is ignored. This behavior was introduced in https://github.com/angular/angular/pull/33787 to fix stale transitive scopes issue (cache was not updated if module overrides are present).

The perf issue comes from a "diamond" problem, where module X is overridden which imports modules A and B, which both import module C. Under previous logic, module C gets its transitive deps recomputed multiple times, during the recompute for both A and B. For deep graphs and big common/shared modules this can be super costly.

This commit updates the logic to recalculate ransitive scopes for the overridden module, while keeping previously calculated scopes of other modules untouched.

PR Close #35454
2020-02-25 13:11:42 -08:00
..
global docs(ivy): document global debugging utilities and clean up API (#34453) 2020-01-30 11:30:32 -08:00
schematics build: upgrade to rules_nodejs 1.0.0 (first stable release) (#34736) 2020-01-15 14:58:07 -05:00
src perf(core): avoid recursive scope recalculation when TestBed.overrideModule is used (#35454) 2020-02-25 13:11:42 -08:00
test perf(core): avoid recursive scope recalculation when TestBed.overrideModule is used (#35454) 2020-02-25 13:11:42 -08:00
testing perf(core): avoid recursive scope recalculation when TestBed.overrideModule is used (#35454) 2020-02-25 13:11:42 -08:00
BUILD.bazel build: add npm_integration_test && angular_integration_test (#33927) 2020-02-24 08:59:18 -08:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
index.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
package.json build: set up all packages to publish via wombot proxy (#33747) 2019-11-13 11:34:33 -08:00
public_api.ts build: publish tree of files rather than FESMs (#18541) 2017-08-31 15:34:50 -07:00