You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Edit Group" page always requests all member subgroups and EPersons. This has bad performance for large groups.
The Angular UI includes code which requests every EPerson in a Group or every Subgroup in a Group in order to determine whether a given EPerson or Group is already included in a given parent Group.
This behavior is used to determine whether to display a Remove or Add button in the "Add EPeople" and "Add Subgroups" section of the "Edit Group" page. See circled content below.
To Reproduce
Steps to reproduce the behavior:
Login as an Admin. Open your browser's DevTools
Go to Access Control and click on Groups.
Edit a Group that has members (either EPerson or SubGroup)
Verify your DevTools shows a request similar to one of these:
/server/api/eperson/groups/[uuid]/epersons?page=0&size=9999 (if the group you are editing has Eperson members)
/server/api/eperson/groups/[uuid]/subgroups?page=0&size=9999 (if the group you are editing has subgroup members)
The size=9999 tells the REST API to return up to 9,999 results on the first page. This essentially disables pagination, unless there are 10,000 or more results.
Expected behavior
The User Interface should never send a request to load all objects at once. This should be redesigned to no longer need to load every object at once.
Related work
Directly related to DSpace/DSpace#9052 (However, this ticket describes improper behavior in dspace-angular, while 9052 describes improper behavior in the backend)
The text was updated successfully, but these errors were encountered:
Describe the bug
Related to DSpace/DSpace#9052
"Edit Group" page always requests all member subgroups and EPersons. This has bad performance for large groups.
The Angular UI includes code which requests every EPerson in a Group or every Subgroup in a Group in order to determine whether a given EPerson or Group is already included in a given parent Group.
For example:
isMemberOfGroup
inmembers-list.component.ts
: https://github.com/DSpace/dspace-angular/blob/main/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts#L216C1-L233C3isSubgroupOfGroup
insubgroups-list.component.ts
: https://github.com/DSpace/dspace-angular/blob/main/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts#L138-L159This behavior is used to determine whether to display a Remove or Add button in the "Add EPeople" and "Add Subgroups" section of the "Edit Group" page. See circled content below.
To Reproduce
Steps to reproduce the behavior:
/server/api/eperson/groups/[uuid]/epersons?page=0&size=9999
(if the group you are editing has Eperson members)/server/api/eperson/groups/[uuid]/subgroups?page=0&size=9999
(if the group you are editing has subgroup members)The
size=9999
tells the REST API to return up to 9,999 results on the first page. This essentially disables pagination, unless there are 10,000 or more results.Expected behavior
The User Interface should never send a request to load all objects at once. This should be redesigned to no longer need to load every object at once.
Related work
Directly related to DSpace/DSpace#9052 (However, this ticket describes improper behavior in dspace-angular, while 9052 describes improper behavior in the backend)
The text was updated successfully, but these errors were encountered: