Affects Version/s: 7.0.X, 7.1.X, Master
Steps to reproduce the issue:
1) create 1 Million+ users and make them site-member of site guest
2) With an admin user (from control panel) go to "sites/ sites"
Expected result: the system shows the list of sites
Actual result: the page takes a very long time to be load
Even with applying the properties:
If the above properties are applied, the first load is slow 'only', and the next ones are occurring fast.
The issue seems to be due to
This issue seems to be due to the API call com.liferay.portal.service.base.UserLocalServiceBaseImpl.getGroupUsersCount
the code seems to do this:
long pks = groupToUserTableMapper.getRightPrimaryKeys(pk);
this means that it gets all (1000.000+) userIds and than get the size while a "SELECT count(userId)" would be much faster.