From: Michael Vrable Date: Mon, 9 Jun 2008 17:25:51 +0000 (-0700) Subject: Do not store subfile signatures for very short blocks. X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=commitdiff_plain;h=d3f9ee42a4023631059f16cc2a8b96b9540750b2 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). --- 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;