Upgrade to PHP 7.4 cause slowness in OPenEMR version 5..02

I just experience this issue in a new upgrade from v5x to v7 and it was fixed with fixing the table collation.