From d3f9ee42a4023631059f16cc2a8b96b9540750b2 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Mon, 9 Jun 2008 10:25:51 -0700 Subject: [PATCH] Do not store subfile signatures for very short blocks. Don't bother to store subfile signatures for very short files, since it is probably not worth the effort: we're probably best off just storing a new copy of the data if it changes anyway. For now, we used a fixed and non-scientific threshold of 16 kB as the minimum size before we'll save subfile signatures. However, short blocks that are created to store any new chunks needed for a subfile incremental are always indexed (since we are likely to want to use the same chunks again in the next backup). --- subfile.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subfile.cc b/subfile.cc index f365c4b..4e13005 100644 --- a/subfile.cc +++ b/subfile.cc @@ -264,7 +264,8 @@ list Subfile::create_incremental(TarSegmentStore *tss, o->write(tss); ObjectReference ref = o->get_ref(); db->StoreObject(ref, block_csum, analyzed_len, block_age); - store_block_signatures(ref, new_block_summary); + if (analyzed_len >= 16384) + store_block_signatures(ref, new_block_summary); refs.push_back(ref); delete o; return refs; -- 2.20.1