author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Sat, 20 Dec 2008 12:05:47 +0000 (13:05 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Jan 2009 03:17:45 +0000 (19:17 -0800) | ||
commit | 2dd625d022074bb677bdd5caa5146cabaf726123 | |
tree | fabcf925aed516dc9054d9b9050f13188d084f74 | tree | snapshot |
parent | 055a5975258f37eecdfcf609a472ab4957a59263 | commit | diff |
Speed up git notes lookup
To avoid looking up each and every commit in the notes ref's tree
object, which is very expensive, speed things up by slurping the tree
object's contents into a hash_map.
The idea fo the hashmap singleton is from David Reiss, initial
benchmarking by Jeff King.
Note: the implementation allows for arbitrary entries in the notes
tree object, ignoring those that do not reference a valid object. This
allows you to annotate arbitrary branches, or objects.
[jc: fixed an obvious error in initialize_hash_map()]
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
To avoid looking up each and every commit in the notes ref's tree
object, which is very expensive, speed things up by slurping the tree
object's contents into a hash_map.
The idea fo the hashmap singleton is from David Reiss, initial
benchmarking by Jeff King.
Note: the implementation allows for arbitrary entries in the notes
tree object, ignoring those that do not reference a valid object. This
allows you to annotate arbitrary branches, or objects.
[jc: fixed an obvious error in initialize_hash_map()]
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
notes.c | diff | blob | history |