fix(ivy): make pipe invocation locality neutral (#22030)
PR Close #22030
This commit is contained in:
@ -795,11 +795,11 @@ export interface Pipe {
|
||||
/**
|
||||
* If Pipe is pure (its output depends only on its input.)
|
||||
*
|
||||
* Normally pipe's `translate` method is invoked on each change detection
|
||||
* cycle. If the cost of invoking the `translated` method is non-trivial and
|
||||
* if the output of the pipe depends only on its input, then declaring a pipe
|
||||
* as pure would short circuit the invocation of the `translate` method and
|
||||
* invoke the method only when the inputs to the pipe change.
|
||||
* Normally pipe's `transform` method is only invoked when the inputs to pipe`s
|
||||
* `transform` method change. If the pipe has internal state (it's result are
|
||||
* dependant on state other than its arguments) than set `pure` to `false` so
|
||||
* that the pipe is invoked on each change-detection even if the arguments to the
|
||||
* pipe do not change.
|
||||
*/
|
||||
pure?: boolean;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ export function pipe<T>(index: number, pipeDef: PipeDef<T>, pipe: T): void {
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes a pure pipe with 4 arguments.
|
||||
* Invokes a pipe with 1 arguments.
|
||||
*
|
||||
* This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
||||
* the pipe only when an input to the pipe changes.
|
||||
@ -33,7 +33,7 @@ export function pipeBind1(index: number, v1: any): any {
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes a pure pipe with 4 arguments.
|
||||
* Invokes a pipe with 2 arguments.
|
||||
*
|
||||
* This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
||||
* the pipe only when an input to the pipe changes.
|
||||
@ -47,7 +47,7 @@ export function pipeBind2(index: number, v1: any, v2: any): any {
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes a pure pipe with 4 arguments.
|
||||
* Invokes a pipe with 3 arguments.
|
||||
*
|
||||
* This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
||||
* the pipe only when an input to the pipe changes.
|
||||
@ -62,7 +62,7 @@ export function pipeBind3(index: number, v1: any, v2: any, v3: any): any {
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes a pure pipe with 4 arguments.
|
||||
* Invokes a pipe with 4 arguments.
|
||||
*
|
||||
* This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
||||
* the pipe only when an input to the pipe changes.
|
||||
@ -78,7 +78,7 @@ export function pipeBind4(index: number, v1: any, v2: any, v3: any, v4: any): an
|
||||
}
|
||||
|
||||
/**
|
||||
* Invokes a pure pipe with variable number of arguments.
|
||||
* Invokes a pipe with variable number of arguments.
|
||||
*
|
||||
* This instruction acts as a guard to {@link PipeTransform#transform} invoking
|
||||
* the pipe only when an input to the pipe changes.
|
||||
|
Reference in New Issue
Block a user