angular-cn/packages/core
Pawel Kozlowski c34c223122 fix(ivy): avoid type coercion in binding-related instruction asserts (#29470)
ivy's bindingUpdated instruction is using the assertNotEqual check to make
sure that NO_CHANGE value (of type Object) is not passed as a value to be
dirty-checked. In practice it means that any value passed as a binding
value would be compared to the NO_CHANGE object.

It turns out that the assertNotEqual is using == and given
that binding values are of different type and we always compare it to the
NO_CHANGE object we were doing lots of type coercion. It resulted in calls
to expensive types conversions and calls to Object.toString().

A profiler reported ~15% of the self time spent in the assertNotEqual
but it turns out that removing type coercion speeds up Material Chips with
input scenario much more (~40ms down to ~20ms).

This PR introduces new assert method `assertNotSame` that uses strict equality
check. The new assertion is used in binding instructions to compare to
NO_CHANGE object reference.

PR Close #29470
2019-03-25 09:34:13 -07:00
..
schematics fix(core): static-query schematic should detect queries in "ngDoCheck" and "ngOnChanges" (#29492) 2019-03-25 09:21:35 -07:00
src fix(ivy): avoid type coercion in binding-related instruction asserts (#29470) 2019-03-25 09:34:13 -07:00
test fix(ivy): TestBed overriding custom ErrorHandler (#29482) 2019-03-22 16:45:33 -07:00
testing fix(ivy): TestBed overriding custom ErrorHandler (#29482) 2019-03-22 16:45:33 -07:00
BUILD.bazel refactor(ivy): move ngcc into a higher level folder (#29092) 2019-03-20 14:45:54 -04: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 feat(core): update schematic to migrate to explicit query timing (#28983) 2019-03-05 14:21:40 -08:00
public_api.ts build: publish tree of files rather than FESMs (#18541) 2017-08-31 15:34:50 -07:00
tsconfig-build.json feat(ivy): implement TestBed (#25369) 2018-08-14 11:58:47 -07:00