Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-34510] Caching Rundeck requests on startup #24

Merged
merged 17 commits into from
Jul 20, 2016

Conversation

szpak
Copy link

@szpak szpak commented Apr 29, 2016

As described in JENKINS-34510 Jenkins startup time with 1500+ rundeck jobs can take multiple minutes due to 1500+ hit to Rundeck.

Proposed solution introduces in-memory cache for findJob method. Cache is implemented using Cache from Guava. Cache is disabled by default for backward compatibility. It can be enabled via Jenkins UI. In addition important parameters are configurable via XML. Cache stats and invalidation operations are available from Jenkins UI.

There are places in code that I'm not satisfies with, but Jenkins limitations (or my little knowledge about its internals) and/or an intention to reduce number of modified places in code held me back. Please do a code review and hopefully merge it into master.

Btw, to reduce boiler plate code in a few places I bump required Java version to 7 (which has been required by Jenkins since early 2015).

Marcin Zajaczkowski added 15 commits April 22, 2016 14:51
Minimal Java version increased to 7 (Jenkins has required it since early 2015).
Version with extensive logging.
Invalidation button can be used in case of changes.
Do prevent issue with OpenJDK. It was fixed in 1.19, but this version
contains incompatible changes and code has to be adjusted.
jmockit/jmockit1#196
Also JavaDoc added.
@szpak szpak changed the title [JENKINS-34510] Caching Rundeck requires on startup [JENKINS-34510] Caching Rundeck requests on startup May 1, 2016
@szpak
Copy link
Author

szpak commented Jul 20, 2016

Rebased against recent changes in master - it's ready to be merged ;)

@gschueler gschueler merged commit d3a5ec5 into jenkinsci:master Jul 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants