My problem relies in these two lines of Angular code :
<div *ngIf="timer$ | async as timer"> {{timer}}</div>
<ng-katex-paragraph [paragraph]="formula"></ng-katex-paragraph>
The first line is a simple timer that refreshes every 100th second.
The second line is a third-party library ("ng-katex"), that displays a mathematical formula (from the string formula)
Issue : every time the timer refreshes, the formula is refreshed as well (like : re-generated), and it takes time. As a consequence the timer is slowed down.
If I had control over the Katex library, I would set changeDetectionStrategy to "onPush" inside it, but Katex is a third party library, so how could I force it to not refresh ?
Thanks for your help ! Here is a minimal repro : https://stackblitz.com/edit/angular-vafchf
Serge