My issue was displaying/hiding a mat-table on a button click using <ng-container *ngIf="myVar">. The 'loading' of the table was very slow with 300 records at 2-3 seconds.
The data is loaded using a subscribe in ngOnInit(), and is available and ready to be used in the template, however the 'loading' of the table in the template became increasingly slower with the increase in number of rows.
My solution was to replace the *ngIf with:
<div [style.display]="activeSelected ? 'block' : 'none'">
_x000D_
. Now the table loads instantly when the button is clicked.