Traversing objects is currently very costly, as every commit and tree must be loaded and parsed. Much time and energy could be saved by caching metadata and topological info in an efficient, easily accessible manner. Furthermore, this could improve git's interfacing potential, by providing a condensed summary of a repository's commit tree. This is the first of a series to implement such a revision caching mechanism, aptly named rev-cache. The series will provide: - a core API to manipulate and traverse caches - an integration into the internal revision walker - a porcelain front-end providing access to users and (shell) applications - a series of tests to verify/demonstrate correctness - documentation of the API, porcelain and core concepts In this particular patch provides: - minimal API: caching only commit topo data - minimal porcelain: add and walk cache slices - appropriate tests - full documentation Signed-off-by: Nick Edelen <sirnot@xxxxxxxxx> --- Documentation/technical/rev-cache.txt | 367 +++++++++++ Makefile | 2 + builtin-rev-cache.c | 197 ++++++ builtin.h | 1 + commit.c | 4 +- git.c | 1 + rev-cache.c | 1160 +++++++++++++++++++++++++++++++++ revision.c | 4 +- revision.h | 41 ++- t/t6015-rev-cache-list.sh | 100 +++ t/t6015-sha1-dump-diff.py | 36 + 11 files changed, 1909 insertions(+), 4 deletions(-)
Attachment:
patch_basic.diff
Description: Binary data