jobd.pl: avoid spawning git to read config info
commit8b7e33dda33b60489dd1a0739ce001575f68cab0
authorKyle J. McKay <mackyle@gmail.com>
Sat, 19 Nov 2016 05:09:49 +0000 (18 21:09 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Sat, 19 Nov 2016 05:09:49 +0000 (18 21:09 -0800)
treefa0ce950b21ec9b5238e0b929fdc31e0d5bd1eb0
parent1aa9676f578915df755a49c800981b8f10125b9d
jobd.pl: avoid spawning git to read config info

The jobd.pl process needs to repeatedly read config information
(lastrefresh, lastgc) to determine whether or not to run jobs.

Instead of spawning a new "git config" process every time a
config item needs to be read, switch to the read_config_file_hash
function and cache the result as long as we're reading from the
same file with the same size and last modification timestamp.

This tremendously speeds up jobd.pl's ability to check and skip
projects which do not need to run either update or gc.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
jobd/jobd.pl