Make data partitioning between threads more effective.
Remove unnecessary computation to make Fixed block chunking faster.
This commit is contained in:
parent
2a218e9da5
commit
f34cfb1aa6
3 changed files with 4 additions and 5 deletions
|
@ -2180,8 +2180,9 @@ start_compress(pc_ctx_t *pctx, const char *filename, uint64_t chunksize, int lev
|
|||
*/
|
||||
file_offset = 0;
|
||||
if (pctx->enable_rabin_split) {
|
||||
rctx = create_dedupe_context(chunksize, 0, 0, pctx->algo, &props, pctx->enable_delta_encode,
|
||||
pctx->enable_fixed_scan, VERSION, COMPRESS, 0, NULL, pctx->pipe_mode, nprocs);
|
||||
rctx = create_dedupe_context(chunksize, 0, pctx->rab_blk_size, pctx->algo, &props,
|
||||
pctx->enable_delta_encode, pctx->enable_fixed_scan, VERSION, COMPRESS, 0, NULL,
|
||||
pctx->pipe_mode, nprocs);
|
||||
rbytes = Read_Adjusted(uncompfd, cread_buf, chunksize, &rabin_count, rctx);
|
||||
} else {
|
||||
rbytes = Read(uncompfd, cread_buf, chunksize);
|
||||
|
|
|
@ -512,8 +512,6 @@ dedupe_compress(dedupe_context_t *ctx, uchar_t *buf, uint64_t *size, uint64_t of
|
|||
ctx->blocks[i]->index = i; // Need to store for sorting
|
||||
ctx->blocks[i]->length = length;
|
||||
ctx->blocks[i]->similar = 0;
|
||||
ctx->blocks[i]->hash = XXH32(buf1+last_offset, length, 0);
|
||||
ctx->blocks[i]->similarity_hash = ctx->blocks[i]->hash;
|
||||
last_offset += length;
|
||||
}
|
||||
goto process_blocks;
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
#define RAB_POLYNOMIAL_WIN_SIZE 16
|
||||
#define RAB_POLYNOMIAL_MIN_WIN_SIZE 8
|
||||
#define RAB_POLYNOMIAL_MAX_WIN_SIZE 64
|
||||
#define RAB_POLYNOMIAL_MAX_BLOCK_SIZE (128 * 1024)
|
||||
#define RAB_POLYNOMIAL_MAX_BLOCK_SIZE (64 * 1024)
|
||||
#define RAB_BLK_MASK (((1 << RAB_BLK_MIN_BITS) - 1) >> 1)
|
||||
#define RAB_BLK_AVG_SZ(x) (1 << ((x) + RAB_BLK_MIN_BITS))
|
||||
|
||||
|
|
Loading…
Reference in a new issue