Steps to reproduce:
1. Create several users > 200
2. create a new event
3. Open admin-ng/resources/USERS.JSON
Actual Results:
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
Expected Results:
Users-List should be available in under 100ms with about 800Users in the system.
Workaround (if any):
Script to create 1000 users in Opencast:
COUNTER=1
while [ $COUNTER -lt 1000 ]; do
echo The counter is $COUNTER
#create Group
curl -i --digest -u opencast_system_account:CHANGE_ME -H 'X-Requested-Auth: Digest' \
http://localhost:8080/groups -F name=$COUNTER
#create User
curl -i --digest -u opencast_system_account:CHANGE_ME -H 'X-Requested-Auth: Digest' \
http://localhost:8080/admin-ng/users -F username=$COUNTER -F password=$COUNTER -F name=$COUNTER -F roles='ROLE_GROUP_'$COUNTER
let COUNTER=COUNTER+1
done
Two related issues: and
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).