Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.7.0
-
Severity 3 - Minor
-
0
-
Description
Issue Summary
Sending a request with a permissions filter on Bitbucket with many users takes a lot of time.
When using the `users` API accordingly with the documentation
When the request includes a permissions filter, it takes ≈10 sec for 27k users.
1 /rest/api/latest/users?permission.1=REPO_READ&permission.1.repositoryId=5736&start=0&limit=20&avatarSize=32
When the request is sent without a permissions filter, it takes ≈100 ms for the same 27k users.
1 /rest/api/latest/users?start=0&limit=20&avatarSize=32
Steps to Reproduce
When the request includes a permissions filter, it takes ≈10 sec for 27k users.
1 /rest/api/latest/users?permission.1=REPO_READ&permission.1.repositoryId=5736&start=0&limit=20&avatarSize=32
When the request is sent without a permissions filter, it takes ≈100 ms for the same 27k users.
1 /rest/api/latest/users?start=0&limit=20&avatarSize=32
Expected Results
Sending a request with a permissions filter on Bitbucket with many users will be faster than 1 sec.
Actual Results
Sending a request with a permissions filter on Bitbucket with many users takes a lot of time.
Workaround
Using repository scoped permissions endpoint that accepts a user filter, it doesn't take nearly as long.
However, there's no filtering by permission for that currently since that only returns the highest permission for users to a repo.