rickyma commented on issue #61: RANGER-2789: GET API service/xusers/users turns very slow URL: https://github.com/apache/ranger/pull/61#issuecomment-611998443 Copied from the issue link: We have more than 1000 users in production environment. When calling API 'service/xusers/users?pageSize=1000&startIndex=0' using HTTP GET method, Ranger Admin takes 10+ minutes to response. I've already uploaded the patch. By applying this patch, the response time has decreased from 10+ minutes to around 30 seconds in our production environment. The problem of this issue is that the original code will query the database for every one of the 1000+ users: https://github.com/apache/ranger/blob/master/security-admin/src/main/java/org/apache/ranger/service/XUserServiceBase.java#L84 The main ideas of the uploaded patch are: 1.Find all users in the database at one time. 2.Use HashMap as cache to store all the database info in memory. 3.Just use the cache during any follow-up db operation.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services