forked from markfasheh/duperemove
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Large hash buckets (in the 10's of thousands range) are costly to walk
in find_all_dups. Instead, we catch those buckets during hash insert time and add filerec pointers (for each unique filerec) to the dupe_blocks_list structure. Later, when find_all_dups() encounters these it walks the filerecs directly instead of the blocks list. This patch halves the time (from 16s to 8s) to calculate extents from a sample hash file (created from my build partition). The value chosen at the moment (30000) is arbitrary. We might want to make it user selectable. There is also the question as to whether it makes sense to _always_ do this but the downside is we then lose the block_ever_seen() shortcut in find_all_dups. Signed-off-by: Mark Fasheh <mfasheh@suse.de>
- Loading branch information
Mark Fasheh
committed
Sep 25, 2014
1 parent
73cf50e
commit dad9711
Showing
6 changed files
with
210 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters