Insight
The reason why Angular is known for being "multiply time" intensive is because it evaluates all expressions in your template during every change detection cycle. This process is initiated by the ApplicationRef.tick method.
Upon application startup, the tick method is immediately executed, following which it is overseen by the ngZone.onMicrotaskEmpty subscription.
In addition, each tick method performs an extra check called checkNoChanges when in dev mode.
Thus, the sequence of events unfolds as follows:
App starts
loadComponent
tick
checkChanges
evaluate getArray()
checkNoChanges
evaluate getArray()
ngZone.onMicrotaskEmpty
subscribe(all promises have been executed)
tick
checkChanges
evaluate getArray()
checkNoChanges
evaluate getArray()
...some time later
subscribe(you click somewhere)
tick
checkChanges
evaluate getArray()
checkNoChanges
evaluate getArray()
subscribe(you make a http request)
tick
checkChanges
evaluate getArray()
checkNoChanges
evaluate getArray()
Prior Suggestion
To optimize performance, it is advisable to refrain from using complex or dynamic calculations within Angular templates that trigger new outputs with each change detection iteration.
Specifically in your case,
<h1 *ngFor="let item of getArray()">
generates a fresh array on every template check. Consequently, the ngForOf directive interprets this modification and attempts to re-render the list (if items are objects).
A more efficient approach involves pre-defining the array before rendering in the code:
arr = ['number one', 'number two']
<h1 *ngFor="let item of arr">
Alternatively, consider implementing a unique key for each item if using trackBy with ngForOf directive.
Further References