1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-22 15:57:07 +00:00
restic/internal
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
..
archiver
backend fixed restic-check does not retry backend.Test failures 2018-01-06 23:22:35 -05:00
cache
checker
crypto
debug
errors errors: Add "Fatal" prefix for Fatalf() 2018-01-06 23:27:47 +01:00
filter
fs fs: Make HasPathPrefix work with relative paths 2018-01-05 17:38:52 +01:00
fuse
hashing
index
limiter
list
migrations
mock
options errors: Add "Fatal" prefix for Fatalf() 2018-01-06 23:27:47 +01:00
pack
pipe
repository repository/index: Optimize index.Has() 2018-01-08 21:46:17 +01:00
restic restorer: Set directory mode as last step 2018-01-07 15:13:24 +01:00
test
walk
worker