Skip to content
Permalink
Browse files

perf(ivy): limit TNode.outputs reads (#32495)

PR Close #32495
  • Loading branch information...
pkozlowski-opensource authored and kara committed Sep 5, 2019
1 parent 6674746 commit 51292e27c9736a00bbb5e65d63eeb7a8c46c425d
Showing with 4 additions and 4 deletions.
  1. +4 −4 packages/core/src/render3/instructions/listener.ts
@@ -182,15 +182,15 @@ function listenerInternal(
}

// subscribe to directive outputs
if (tNode.outputs === undefined) {
let outputs = tNode.outputs;
if (outputs === undefined) {
// if we create TNode here, inputs must be undefined so we know they still need to be
// checked
tNode.outputs = generatePropertyAliases(tView, tNode, BindingDirection.Output);
outputs = tNode.outputs = generatePropertyAliases(tView, tNode, BindingDirection.Output);
}

const outputs = tNode.outputs;
let props: PropertyAliasValue|undefined;
if (processOutputs && outputs && (props = outputs[eventName])) {
if (processOutputs && outputs !== null && (props = outputs[eventName])) {
const propsLength = props.length;
if (propsLength) {
const lCleanup = getCleanup(lView);

0 comments on commit 51292e2

Please sign in to comment.
You can’t perform that action at this time.