Issue Type: Improvement Improvement
Assignee: Sam Kottler
Components: github-oauth
Created: 31/Jul/14 8:17 PM
Description:

Github pull request #27

On jenkins instances with a large number of jobs the previous implementation got very slow because it made a github api call per job & did not do a great job of caching. This pull reduces the chatter with the github api by asking which repos the user has access to and caching the results.

There are 2 big changes in this pull

1. The algorithm now builds and caches a list of "my repositories"

It makes these api calls to github:
1. Get list of the non-organization repos user has access to /api/v3/user/repos
2. Get list of organizations with repos user has access to /api/v3/user/orgs. For each organization

Get a list of repos in that org user has access to /api/v3/orgs/XXX/repos
Because of pagination it sometimes makes several calls to get the full list of repos.

2. Cache list of public repositories for read-only access.

For this it still makes an api call per repository but caches the results for all users.

On my jenkins instance with ~400 projects this has improved performance from unusable (minutes to load the home page) to pretty fast (~4 seconds as it builds the cache and faster after that).

Project: Jenkins
Labels: plugin
Priority: Major Major
Reporter: alex rothenberg
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to