From: Karl Hasselström Date: Wed, 23 Jul 2008 21:29:09 +0000 (+0200) Subject: Reuse the same temp index in a transaction X-Git-Tag: v0.15-rc1~192 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/afa3f9b9ed5eeac9c98d7c43e82ba31e7b9e9826?hp=afa3f9b9ed5eeac9c98d7c43e82ba31e7b9e9826 Reuse the same temp index in a transaction Instead of making a new temp index every time we need one, just keep reusing the same one. And keep track of which tree is currently stored in it -- if we do several consecutive successful pushes, it's always going to be the "right" tree so that we don't have to call read-tree before each patch application. The motivation behind this change is of course that it makes things faster. (The same simple test as in the previous patch -- pushing 250 patches in a 32k-file repository, with one file-level merge necessary per push -- went from 0.36 to 0.19 seconds per patch with this patch applied.) Signed-off-by: Karl Hasselström ---