API to get the list of all repo admins takes long time to load

Hi,

We are developing a plugin to display the repo admins for each repo in Bitbucket. In the servlet, we are using the below class to get the repo admins

UserSearchRequest userSearchRequest = new UserSearchRequest.Builder()
.repositoryPermission(repo, Permission.REPO_ADMIN)
.build();
Page repoAdmins = userService.search(userSearchRequest, PageUtils.newRequest(0, 5000));

We have observed that the request takes long time to load(around 2mins). Is there any way to reduce the load time. Also, is there any other way to achieve our goal without using the above class.

Thanks,
Dhivya

1 Like