[core] Improved performance of UserGroup