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


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)
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.


1 Like