restic/internal
Michael Eischer bcc3bddcf4 filter: only check whether a child path could match when necessary
When checking excludes there is no need to test whether a child path
could also match the pattern, as it is by definition excluded.
Previously childMayMatch was calculated but then discarded. For simple
absolute paths this can account for half the time spent for checking
pattern matches.

name                          old time/op    new time/op    delta
FilterPatterns/Relative-4       23.3ms ± 9%    21.7ms ± 6%   -6.68%  (p=0.004 n=10+10)
FilterPatterns/Absolute-4       13.9ms ± 7%    10.0ms ± 5%  -27.61%  (p=0.000 n=10+10)
FilterPatterns/Wildcard-4       51.4ms ± 7%    47.0ms ± 7%   -8.51%  (p=0.001 n=9+9)
FilterPatterns/ManyNoMatch-4     551ms ± 9%     190ms ± 1%  -65.41%  (p=0.000 n=10+8)

name                          old alloc/op   new alloc/op   delta
FilterPatterns/Relative-4       3.57MB ± 0%    3.57MB ± 0%     ~     (p=0.665 n=10+9)
FilterPatterns/Absolute-4       3.57MB ± 0%    3.57MB ± 0%     ~     (p=0.480 n=9+10)
FilterPatterns/Wildcard-4       14.3MB ± 0%    14.3MB ± 0%     ~     (p=0.431 n=9+10)
FilterPatterns/ManyNoMatch-4    3.57MB ± 0%    3.57MB ± 0%     ~     (all equal)

name                          old allocs/op  new allocs/op  delta
FilterPatterns/Relative-4        22.2k ± 0%     22.2k ± 0%     ~     (all equal)
FilterPatterns/Absolute-4        22.2k ± 0%     22.2k ± 0%     ~     (all equal)
FilterPatterns/Wildcard-4        88.7k ± 0%     88.7k ± 0%     ~     (all equal)
FilterPatterns/ManyNoMatch-4     22.2k ± 0%     22.2k ± 0%     ~     (all equal)
2020-10-07 20:47:52 +02:00
..
archiver Check error in archiver before calling Select 2020-10-05 11:11:04 +02:00
backend Swap deprecated GCS lib with replacement 2020-10-03 18:55:56 +02:00
cache Less repetitive error messages in internal/cache 2020-10-05 20:28:54 +02:00
checker repository: Simplify worker group code 2020-09-05 10:07:16 +02:00
crypto crypto: Remove unused error 2020-09-05 10:07:16 +02:00
debug Remove build tag release 2018-10-11 19:40:38 +02:00
dump Move internal/fs.TestChdir to internal/test.Chdir 2020-09-17 10:43:33 +02:00
errors backup: Improve error message for invalid pattern 2018-10-03 11:12:51 +02:00
filter filter: only check whether a child path could match when necessary 2020-10-07 20:47:52 +02:00
fs Simplify os.ModeType|os.ModeCharDevice => os.ModeType 2020-09-21 14:21:32 +02:00
fuse Merge a few variable declaration and initializations 2020-09-05 10:05:34 +02:00
hashing Micro-optimization for hashing.Writer/PackerManager 2020-03-05 22:30:04 +01:00
index Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
limiter rclone: Respect bandwith limits 2018-05-22 20:48:17 +02:00
migrations Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
mock mock: Remove unused repository type 2019-04-13 13:38:39 +02:00
options options: Fix test for Go >= 1.15 2020-09-12 17:36:44 +02:00
pack Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
repository init: Add --copy-chunker-params option 2020-09-19 16:53:05 +02:00
restic backup: Correct keep policy text 2020-09-28 14:26:53 +02:00
restorer Upgrade cespare/xxhash to 2.1.1 2020-10-05 17:25:39 +02:00
selfupdate self-update: Don't cancel download after 30 seconds 2019-02-23 11:15:18 +01:00
test Move internal/fs.TestChdir to internal/test.Chdir 2020-09-17 10:43:33 +02:00
textfile Remove io.Writer from fs.File 2020-09-21 14:21:32 +02:00
ui Unindent else block after if block ending with a return statement 2020-09-05 10:07:16 +02:00
walker error variable names should start with 'Err' 2020-09-05 10:07:17 +02:00