On Wed, Mar 01, 2017 at 12:58:39PM -0800, Linus Torvalds wrote: >> I don't think that helps. The sha1 over the pack-file takes about 1.3s >> with openssl, and 5s with sha1dc. So we already know the increase there >> is only a few seconds, not a few minutes. > > OK. I guess what w could easily do is to just add an argument to > git_SHA1_Init() to say whether we want checking or not, and only use the > checking functions when receiving objects (which would include creating new > objects from files, and obviously deck). > > You'd still eat the cost on the receiving side of a clone, but that's when > you really want the checking anyway. At least it wouldn't be so visible on > the sending side, which is all the hosting etc, where there might be server > utilization issues. > > Would that make deployment happier? It should be an easy little flag to > add, I think. I don't think it makes all that big a difference. The sending side wastes the extra 2-3 seconds of CPU to checksum the whole packfile, but it's not inflating all the object contents in the first place (between reachability bitmaps to get the list of objects in the first place, and then verbatim reuse of pack contents). Which isn't to say it's not reasonable to limit the checking to a few spots (basically anything that's _writing_ objects). But I don't think it makes a big difference to the server side of a fetch or clone. -Peff