diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-03 19:50:35 -0700 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2023-02-04 20:53:23 -0700 |
commit | ef60daef395b20b67042c011f5b2a1131049e275 (patch) | |
tree | c70aa1661272e10883bbc57373cf00ab980ef336 /lib/btrfsprogs/btrfsinspect/rebuildmappings/rebuildmappings.go | |
parent | 77f3c0d7cd21274d00984b72dfce05394d11bdd0 (diff) |
rebuildmappings: Optimize the KMP search
Diffstat (limited to 'lib/btrfsprogs/btrfsinspect/rebuildmappings/rebuildmappings.go')
-rw-r--r-- | lib/btrfsprogs/btrfsinspect/rebuildmappings/rebuildmappings.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/btrfsprogs/btrfsinspect/rebuildmappings/rebuildmappings.go b/lib/btrfsprogs/btrfsinspect/rebuildmappings/rebuildmappings.go index 665bc96..cdf5e5a 100644 --- a/lib/btrfsprogs/btrfsinspect/rebuildmappings/rebuildmappings.go +++ b/lib/btrfsprogs/btrfsinspect/rebuildmappings/rebuildmappings.go @@ -158,10 +158,6 @@ func RebuildMappings(ctx context.Context, fs *btrfs.FS, scanResults btrfsinspect // The fuzzy-search is only fast because the exact-search is so good at getting `physicalBlocks` down. // Empirically: if I remove the exact-search step, then the fuzzy-match step is more than an order of magnitude // slower. - // - // The exact-search probably could be optimized to be substantially faster (by a constant factor; not affecting - // the big-O) by figuring out how to inline function calls and get reduce allocations, but IMO it's "fast - // enough" for now. ctx = dlog.WithField(_ctx, "btrfsinspect.rebuild-mappings.step", "5/6") dlog.Infof(_ctx, "5/6: Searching for %d block groups in checksum map (exact)...", len(bgs)) physicalSums := ExtractPhysicalSums(scanResults) |