RDTK / generator

A tool for creating Jenkins jobs and other things from recipes describing software projects
GNU General Public License v3.0
21 stars 3 forks source link

Cache git ls-remote invocations #4

Closed scymtym closed 5 years ago

scymtym commented 5 years ago

Despite the existing Git cache, a significant amount of the work performed in the analysis phase consists of git ls-remote calls which determine whether a branch has changed in the remote repository since the most recent analysis results have been cached.

Due to the relatively low change frequency in most repositories, this is work is mostly wasted, especially if subsequent analyses are performed in within a short period of time (as is the case, for example, when re-running the generator after getting commandline options wrong).

The proposal is to cache git ls-remote results and use the cache without contacting the remote repository for subsequent analyses within a certain time window, for example 30 minutes.