diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-09-05 18:33:39 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-09-05 18:33:39 -0700 |
| commit | 3fe0121479ea340936d11927efa5a45a4e1e39cc (patch) | |
| tree | 8c2bc27b33f476356ed6e2dbba1ce7be20d5cebd /pack-bitmap.h | |
| parent | cf98b69053996728f131671ed7ff9581b0e8943a (diff) | |
| parent | 969a5645876ccf368ed74fde2c5dc9b5432b7bb0 (diff) | |
| download | git-3fe0121479ea340936d11927efa5a45a4e1e39cc.tar.xz | |
Merge branch 'ac/bitmap-lookup-table'
The pack bitmap file gained a bitmap-lookup table to speed up
locating the necessary bitmap for a given commit.
* ac/bitmap-lookup-table:
pack-bitmap-write: drop unused pack_idx_entry parameters
bitmap-lookup-table: add performance tests for lookup table
pack-bitmap: prepare to read lookup table extension
pack-bitmap-write: learn pack.writeBitmapLookupTable and add tests
pack-bitmap-write.c: write lookup table extension
bitmap: move `get commit positions` code to `bitmap_writer_finish`
Documentation/technical: describe bitmap lookup table extension
Diffstat (limited to 'pack-bitmap.h')
| -rw-r--r-- | pack-bitmap.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pack-bitmap.h b/pack-bitmap.h index f3a57ca065..f0180b5276 100644 --- a/pack-bitmap.h +++ b/pack-bitmap.h @@ -23,9 +23,19 @@ struct bitmap_disk_header { #define NEEDS_BITMAP (1u<<22) +/* + * The width in bytes of a single triplet in the lookup table + * extension: + * (commit_pos, offset, xor_row) + * + * whose fields ar 32-, 64-, 32- bits wide, respectively. + */ +#define BITMAP_LOOKUP_TABLE_TRIPLET_WIDTH (16) + enum pack_bitmap_opts { - BITMAP_OPT_FULL_DAG = 1, - BITMAP_OPT_HASH_CACHE = 4, + BITMAP_OPT_FULL_DAG = 0x1, + BITMAP_OPT_HASH_CACHE = 0x4, + BITMAP_OPT_LOOKUP_TABLE = 0x10, }; enum pack_bitmap_flags { |
