angular-cn/packages/core/testing/src
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
..
async.ts docs: update core to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
async_fallback.ts refactor: utilize type narrowing (#33075) 2019-10-10 15:18:44 -07:00
async_test_completer.ts build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
before_each.ts docs: in doc comments, replace [aA]ngular2 with Angular (#15463) 2017-03-27 09:44:35 -07:00
component_fixture.ts docs: update core to use `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
fake_async.ts feat: add an tickOptions parameter with property processNewMacroTasksSynchronously. (#33838) 2020-02-20 15:14:59 -08:00
fake_async_fallback.ts feat: add an tickOptions parameter with property processNewMacroTasksSynchronously. (#33838) 2020-02-20 15:14:59 -08:00
lang_utils.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
logger.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
metadata_override.ts docs: convert all `@experimental` tags to `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00
metadata_overrider.ts refactor(core): replace instanceof Array (#33077) 2019-10-14 23:44:57 +00:00
ng_zone_mock.ts feat: add a flag in bootstrap to enable coalesce event change detection to improve performance (#30533) 2019-11-05 18:58:25 +00:00
private_export_testing.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
r3_test_bed.ts fix: work around 'noImplicityAny' incompatibility due to ts3.7 update (#34798) 2020-01-16 12:06:57 -05:00
r3_test_bed_compiler.ts perf(core): avoid recursive scope recalculation when TestBed.overrideModule is used (#35454) 2020-02-25 13:11:42 -08:00
resolvers.ts fix(ivy): TestBed rewrite to avoid unnecessary recompilations (#29483) 2019-03-27 09:41:58 -07:00
styling.ts refactor(ivy): Switch styling to new reconcile algorithm (#34616) 2020-01-24 12:23:00 -08:00
test_bed.ts feat: add a flag in bootstrap to enable coalesce event change detection to improve performance (#30533) 2019-11-05 18:58:25 +00:00
test_bed_common.ts feat(core): Deprecate TestBed.get as deprecated (#32406) 2019-09-11 20:28:56 -04:00
test_compiler.ts docs: convert all `@experimental` tags to `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00
testing.ts refactor(ivy): cleanup the public API for core/testing (#25492) 2018-08-15 09:53:17 -07:00
testing_internal.ts refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00