angular-cn/packages
Kristiyan Kostadinov 18b33e79d3 perf(core): avoid storing LView in __ngContext__ (#41358)
Currently we save a reference to an `LView` on most DOM nodes created by Angular either by saving
the `LView` directly in the `__ngContext__` or by saving the `LContext` which has a reference to
the `LView`. This can be a problem if the DOM node is retained in memory, because the `LView` has
references to all of the child nodes of the view, as well as other internal data structures.

Previously we tried to resolve the issue by clearing the `__ngContext__` when a node is removed
(see https://github.com/angular/angular/pull/36011), but we decided not to proceeed, because it can
slow down destruction due to a megamorphic write.

These changes aim to address the issue while reducing the performance impact by assigning a unique
ID when an `LView` is created and adding it to `__ngContext__`. All active views are tracked in
a map where their unique ID is used as the key. We don't need to worry about leaks within that map,
because `LView`s are an internal data structure and we have complete control over when they are
created and destroyed.

Fixes #41047.

PR Close #41358
2021-04-26 09:31:41 -07:00
..
animations fix(animations): allow animations on elements in the shadow DOM (#40134) 2021-04-15 12:45:52 -07:00
bazel build: use platform from shared dev-infra package for remote execution (#41767) 2021-04-23 11:01:40 -07:00
benchpress fix(dev-infra): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
common fix(common): viewport scroller not finding elements inside the shadow DOM (#41644) 2021-04-15 12:47:05 -07:00
compiler fix(compiler): not generating update instructions for ng-template inside alternate namespaces (#41669) 2021-04-20 09:44:44 -07:00
compiler-cli fix(compiler-cli): match string indexed partial declarations (#41747) 2021-04-22 10:43:08 -07:00
core perf(core): avoid storing LView in __ngContext__ (#41358) 2021-04-26 09:31:41 -07:00
docs docs(di): fix typo in advanced di doc (#36634) 2020-05-01 09:50:28 -07:00
elements build: remove `core-js` in favor of `core-js-bundle` (#41739) 2021-04-26 09:29:58 -07:00
examples refactor(core): add single type for injector token (#41580) 2021-04-22 10:47:12 -07:00
forms feat(forms): update supported range of node versions (#41544) 2021-04-14 09:40:18 -07:00
language-service fix(compiler-cli): autocomplete literal types in templates. (#41456) (#41645) 2021-04-16 08:54:27 -07:00
localize build: update glob to version 7.1.6 (#41667) 2021-04-19 08:24:27 -07:00
misc/angular-in-memory-web-api build: remove `core-js` in favor of `core-js-bundle` (#41739) 2021-04-26 09:29:58 -07:00
platform-browser feat(platform-browser): update supported range of node versions (#41544) 2021-04-14 09:40:18 -07:00
platform-browser-dynamic feat(platform-browser-dynamic): update supported range of node versions (#41544) 2021-04-14 09:40:18 -07:00
platform-server feat(platform-server): update supported range of node versions (#41544) 2021-04-14 09:40:18 -07:00
private/testing build: update .bazelversion (#40579) 2021-01-26 11:35:54 -08:00
router fix(router): Only retrieve stored route when reuse strategy indicates it should reattach (#30263) 2021-04-15 11:32:59 -07:00
service-worker test(service-worker): replace `global || window` with `globalThis` (#41739) 2021-04-26 09:29:59 -07:00
upgrade fix(upgrade): preserve $interval.flush when ngMocks is being used (#30229) 2021-04-23 09:44:50 -07:00
zone.js test(zone.js): should invoke XHR task even onload handler throw error. (#41562) 2021-04-21 15:54:08 -07:00
BUILD.bazel build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
circular-deps-test.conf.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
license-banner.txt docs: update year (#40925) 2021-02-22 12:37:40 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build-no-strict.json
tsconfig-build.json
tsconfig-test.json
tsconfig.json fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
types.d.ts build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT