We currently have a large number of groups which need to be manageable within the membership UI. Two lists with possible thousands of groups need to be displayed. The pull request https://github.com/keycloak/keycloak/pull/4710 handles pagination and search for available groups part of this view.
We have extended REST API to support pagination and search on group membership endpoint of a user. In addition to this Angular frontend was adapted to use this features to provide a paginated and searchable list for available groups and membership.
FYI: Datatype of membership results was changed from Set to List since we need an order of groups to keep pages consistent.
This feature extends the open issue: https://issues.jboss.org/browse/KEYCLOAK-2538