Improve performance of fetching contributor details using Java RTC API
Hi,
I'm using code largely based off of the following blog post:
In our test environments it worked fine, however in production environments with projects that have thousands of users the performance is much much slower.
I ran the code attached to the above blog post (20121209_AnalyzeProjectAreaContributorsAndRoles.zip) and it took over 19 minutes to fetch about 7000 users in one project.
My code takes about 6 minutes to similar fetch details about users in a project (user id and user name):
Is there anyway to improve it, such as by mass fetching all the users in a project at once, and not one by one?
|
One answer
Utilize fetchCompleteItems method for quicker results.
If only partial data is ultimately required, use fetchPartialItems from the same itemManager interface of team repository interface.
More speed can be got by using an executor service, to have two tasks, to get data for members and administrators.
If speed is only your concern, you use a GET Httpconnection to query RPT Rest service of your server, to quickly get user information in XML format and its response is generally way fast than plain Java API, as the results are processed and formatted at server side itself.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.