diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-02-21 18:05:16 +0300 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-02-21 19:13:43 +0300 |
commit | 817c28201e2a9564b38a624be491245aa025c77f (patch) | |
tree | dfcf8639c04f6e1ddfe3eb6b9980dc0b3d06cd21 /src/index.h | |
parent | 874c3b6f37e291233be389dbacdb7178af85ad2f (diff) |
Rewrite all file IO for more performance
The new `git_filebuf` structure provides atomic high-performance writes
to disk by using a write cache, and optionally a double-buffered scheme
through a worker thread (not enabled yet).
Writes can be done 3-layered, like in git.git (user code -> write cache
-> disk), or 2-layered, by writing directly on the cache. This makes
index writing considerably faster.
The `git_filebuf` structure contains all the old functionality of
`git_filelock` for atomic file writes and reads. The `git_filelock`
structure has been removed.
Additionally, the `git_filebuf` API allows to automatically hash (SHA1)
all the data as it is written to disk (hashing is done smartly on big
chunks to improve performance).
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/index.h')
-rw-r--r-- | src/index.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.h b/src/index.h index 747ced0cf..43aadff0f 100644 --- a/src/index.h +++ b/src/index.h @@ -2,7 +2,7 @@ #define INCLUDE_index_h__ #include "fileops.h" -#include "filelock.h" +#include "filebuf.h" #include "vector.h" #include "git2/odb.h" #include "git2/index.h" |