conserve icon indicating copy to clipboard operation
conserve copied to clipboard

Counting index hunks by iteration is slightly inefficient

Open sourcefrog opened this issue 5 years ago • 0 comments

From https://github.com/sourcefrog/conserve/pull/133#issue-440960172

Current code (https://github.com/sourcefrog/conserve/blob/bd6759f13915e6c2eccc02ab93642162fd1e5709/src/index.rs#L237-L256) to determine the number of index hunks probes for each of them, which is a bit inefficient. However this is only done once per restore, so it's not really a hot path.

Better ways to do this:

  • look in the band tail for a count, if it's there
  • otherwise, list the index directories

sourcefrog avatar Jul 04 '20 23:07 sourcefrog