Last modified: 2014-02-03 04:04:11 UTC
Special:Version on labs requires digging out the info from git for each extension, this comes down to git show on each extension, which takes far too long. Either information should be cached and we should be clever about how we check that the cached info for an ext is no longer valid, or we should get the info for multiple repos in a batch, instead of shelling out separately for each one. Representative is this output: Served by deployment-apache33 in 28.877 secs. See http://en.wikipedia.beta.wmflabs.org/wiki/Special:Version to test for yourselves.
The code in Special:Version does look for the HEAD sha1 (which first read .git/HEAD then if it is a ref load .git/refs/origin/master to get the actual sha1). Then we look for the commit date with getHeadCommitDate() which shells out. What could be done is to cache the commit date in memcached with a key like git-sha1-date-<the sha1 there>. That would prevent the shell outs though still requires a bunch of stats() /file reads. The code is also duplicated in getCreditsForExtension() and thus need to be updated there as well.