summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-09-29 09:07:41 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-10-10 19:43:42 +0200
commit7465e873996c4157b8e10e353b803841c548e2dc (patch)
tree26bb3ece7c75d191b44e62b6047c58697687dac3 /src/commit.c
parent795d8e932893b9944c6fe72191cb80c2ccdd5d34 (diff)
downloadlibgit2-7465e873996c4157b8e10e353b803841c548e2dc.tar.gz
index: fill the tree cache on write-tree
An obvious place to fill the tree cache is on write-tree, as we're guaranteed to be able to fill in the whole tree cache. The way this commit does this is not the most efficient, as we read the root tree from the odb instead of filling in the cache as we go along, but it fills the cache such that successive operations (and persisting the index to disk) will be able to take advantage of the cache, and it reuses the code we already have for filling the cache. Filling in the cache as we create the trees would require some reallocation of the children vector, which is currently not possible with out pool implementation. A different data structure would likely allow us to perform this operation at a later date.
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions