summaryrefslogtreecommitdiff
path: root/builtin/commit-graph.c
diff options
context:
space:
mode:
authorChandra Pratap <chandrapratap3519@gmail.com>2024-08-21 18:00:56 +0530
committerJunio C Hamano <gitster@pobox.com>2024-08-21 09:41:41 -0700
commit31216ee28a452d39d9fba6cd72d8b072eab50af1 (patch)
tree5c004e2f61323bf96cf4d6b55c5e93a69941cb98 /builtin/commit-graph.c
parentc25cbcd352c5831a1270b57104ecb6c0e6789a0c (diff)
t-reftable-block: use block_iter_reset() instead of block_iter_close()
block_iter_reset() restores a block iterator to its state at the time of initialization without freeing any memory while block_iter_close() deallocates the memory for the iterator. In the current testing setup, a block iterator is allocated and deallocated for every iteration of a loop, which hurts performance. Improve upon this by using block_iter_reset() at the start of each iteration instead. This has the added benifit of testing block_iter_reset(), which currently remains untested. Similarly, remove reftable_record_release() for a reftable record that is still in use. Mentored-by: Patrick Steinhardt <ps@pks.im> Mentored-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions