2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-27 20:45:19 +00:00
restic/internal/repository
Matthew Dawson 539599d1f1 repository/index: Optimize index.Has()
When backing up several million files (>14M tested here) with few changes,
a large amount of time is spent failing to find an id in an index and creating
an error to signify this.  Since this is checked using the Has method,
which doesn't use this error, this time creating the error is wasted.

Instead, directly check if the given id and type are present in the index.
This also avoids reporting all the packs containing this blob, further
reducing cpu usage.
2018-01-08 21:46:17 +01:00
..
testdata Moves files 2017-07-23 14:19:13 +02:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
index_test.go repository/index: Optimize index.Has() 2018-01-08 21:46:17 +01:00
index.go repository/index: Optimize index.Has() 2018-01-08 21:46:17 +01:00
key.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
master_index.go fixes #1251, race when writing indexes 2017-10-07 05:11:42 -07:00
packer_manager_test.go repo: Split packers for tree and data 2017-09-22 15:36:47 +02:00
packer_manager.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00
parallel_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
parallel.go Ignore files with invalid name in the repo 2017-09-10 11:00:07 +02:00
pool.go Moves files 2017-07-23 14:19:13 +02:00
repack_test.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00
repack.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00
repository_test.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00
repository.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00
testing.go Rename KDFParams -> Params 2017-10-28 10:28:29 +02:00