Angular executes an impure pipe during every component change detection cycle. An impure pipe is called often, as often as every keystroke or mouse-move.
With that concern in mind, implement an impure pipe with great care. An expensive, long-running pipe could destroy the user experience.
@Pipe({ name: 'flyingHeroesImpure', pure: false })
References
https://angular.io/guide/pipes#pure-and-impure-pipes