Project goal: Improve git plugin performance
Skills to study/improve: Java, Git, Benchmarking, JMH
Improve Jenkins git plugin performance by fixing known issues in performance critical areas. Implement performance comparisons between the command line git and JGit implementations using the Java Microbenchmark Harness. Improve the performance of git operations that use the command line git implementation by selectively replacing CLI implementations with JGit when benchmarks show a significant performance gain.
The Jenkins git plugin copies remote git repositories into Jenkins workspaces on agents as part of a 'checkout'. The checkout creates an empty git repository in the workspace, configures it with 'git config', and populates it with 'git fetch'. Unfortunately, the most commonly used path through the code will call 'git fetch' twice.
The second call to 'git fetch' is useless when it is using the same arguments as the first call. It wastes server time, network bandwidth, and job time. With large repositories, that waste of time may be a minute or more.
Implement at least one automated test to detect the redundant fetch
Implement changes in the git plugin and the git client plugin to avoid the second call to 'git fetch' when using the same arguments as the first call to 'git fetch'.
Present the results of those comparisons.
Use the results of the comparisons and common use cases to prioritize operations for performance improvement.
Confirm that existing automated tests adequately verify the existing implementations. If they do not adequately verify implementation behaviors, write additional automated tests to verify the existing implementations.
Replace a command line git implementation with a JGit implementation in cases where benchmarks show JGit is faster.
Confirm that benchmark tests show the performance improvement.
Confirm that automated tests confirm no loss of functionality.
The project idea is expected to require changes in both the git client plugin and the git plugin.
Install a git client plugin development environment by following the contributing instructions. Compile the plugin, run its automated tests, and confirm that the automated tests are passing. Enable coverage reporting and review the coverage report.
Install a git plugin development environment by following the contributing instructions. Compile the plugin, run its automated tests, and confirm that the automated tests are passing. Enable coverage reporting and review the coverage report.
Install an integrated development environment (Netbeans, Eclipse, IntelliJ, …). Run the git plugin in the development environment. Set a breakpoint and confirm that the breakpoint is reached in the development environment.
Consider implementing a fix for one or more of the newbie friendly issues.
JENKINS-49757 - Git plugin calls fetch twice per checkout
JENKINS-56404 - Exclude redundant fetch