3176: post-review requests to a server with thousand of repo is very slow

nan****@gmai***** (Google Code) (Is this you? Claim this profile.)
What version are you running?
rbtools-0.5.1
reviewboard server 1.7.6

What's the URL of the page containing the problem?
api/repositories

What steps will reproduce the problem?
1. reviewboard server with more than 1000 repo in Europe
2. postreview client in China
3. before posting a review, list of repo is requested to match repository id/path, by default max-results is 250, so a lot of slow requests

What is the expected output? What do you see instead?
increase default max-results for repository request ? could be all repo or been configurable in ~/.reviewboardrc


What operating system are you using? What browser?
linux ubuntu/rhel

Please provide any additional information below.
many git repo and many clearcase ones
#1 nan****@gmai***** (Google Code) (Is this you? Claim this profile.)
on postreview.py, this workaround has been done, is there a better way to prevent hardcoding max-results? or set it to all?
---------------------------- rbtools/postreview.py ----------------------------
index fe86b71..17a6b94 100755
@@ -514,8 +514,9 @@ class ReviewBoardServer(object):
             rsp = self.api_get('api/json/repositories/')
             repositories = rsp['repositories']
         else:
+            # TCH: add max-results=1000 to reduce HTTP queries count
             rsp = self.api_get(
-                self.root_resource['links']['repositories']['href'])
+                self.root_resource['links']['repositories']['href'] + '?max-results=1000')
             repositories = rsp['repositories']
 
             while 'next' in rsp['links']:
david
#2 david
  • +Component-RBTools
chipx86
#3 chipx86
  • +Project-RBTools
david
#4 david
  • -reviewboard
    +rbtools
  • -Project:RBTools