Database Query of Users from UserlistProvider is very slow
Steps to reproduce
Steps to reproduce:
1. Create several users > 200
2. create a new event
3. Open admin-ng/resources/USERS.JSON
opening add event takes about 4sec
opening admin-ng/resources/USERS.JSON takes about 1sec
Loading time increases linear with the amount of users in the system
Users-List should be available in under 100ms with about 800Users in the system.
Workaround (if any):
The change to lazy loading for JpaUser (similarly for JpaUserReference) eliminates a query per user of this form:
SELECT t1.id, t1.description, t1.name, t1.organization FROM mh_user_role t0, mh_role t1 WHERE ((t0.user_id = 29598) AND (t1.id = t0.role_id))
The performance impact of this issue is not in the query time for any individual query, but just the volume of queries (one per user).