I have pure pipe TranslatePipe
that translates phrases using LocaleService
that has locale$: Observable
current locale. I al
BEST PERFORMANCE SOLUTION:
I figured out a solution for this. I hate to call it a solution, but it works.
I was having the same issue with and orderBy pipe. I tried all the solutions here but the performance impact was terrible.
I simply added an addtional argument to my pipe
let i of someArray | groupBy:'someField':updated"
then anytime I perform an update to the array I simply to
updateArray(){
//this can be a service call or add, update or delete item in the array
.then.....put this is in the callback:
this.updated = new Date(); //this will update the pipe forcing it to re-render.
}
This forces my orderBy pipe to do a transform again. And the performance is a lot better.