2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-05 21:07:52 +00:00
restic/cmd/restic
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
..
testdata Add prune integration tests for many edge cases 2020-10-06 20:20:05 +02:00
.gitignore Moves files 2017-07-23 14:19:13 +02:00
cleanup.go Replace fmt.Printf/Println/Fprintf with wrapper functions 2020-06-14 11:08:11 +02:00
cmd_backup.go Support excluding files by size 2020-09-19 19:52:09 +08:00
cmd_cache.go cache/check: Clarify error message when given arguments 2020-10-06 00:08:59 +02:00
cmd_cat.go Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
cmd_check.go cache/check: Clarify error message when given arguments 2020-10-06 00:08:59 +02:00
cmd_copy.go init: Add --copy-chunker-params option 2020-09-19 16:53:05 +02:00
cmd_debug.go Use "pack file" instead of "data file" (#2885) 2020-08-16 11:16:38 +02:00
cmd_diff.go diff: Optimize diff calculation for shared subtrees 2020-09-13 16:28:46 +02:00
cmd_dump_test.go dump: Add test for splitPath 2020-08-30 16:00:48 +02:00
cmd_dump.go dump: Mention tar output in command help text 2020-08-31 22:43:10 +02:00
cmd_find.go error variable names should start with 'Err' 2020-09-05 10:07:17 +02:00
cmd_forget.go --help: --compact: clarify description 2020-10-02 16:55:56 +03:00
cmd_generate.go Update usage strings to put flags before args 2020-08-28 02:16:22 +00:00
cmd_init.go Add new option --repository-file (default: $RESTIC_REPOSITORY_FILE) 2020-10-01 00:50:26 +02:00
cmd_key.go Improve wording for --password-file and related options 2020-09-19 15:47:32 +02:00
cmd_list.go Update usage strings to put flags before args 2020-08-28 02:16:22 +00:00
cmd_ls.go Merge pull request #2630 from MichaelEischer/fix-staticcheck 2020-09-13 16:19:22 +02:00
cmd_migrate.go Update usage strings to put flags before args 2020-08-28 02:16:22 +00:00
cmd_mount.go cmd/mount: honour --no-lock flag 2020-08-03 19:45:39 +02:00
cmd_options.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_prune.go Unify progress bar of check and prune commands 2020-08-25 22:47:38 +02:00
cmd_rebuild_index.go prune/rebuild-index: Fail if an old index cannot be removed 2020-08-16 11:34:01 +02:00
cmd_recover.go recover: Fix typo in the command help 2020-09-30 17:44:34 +02:00
cmd_restore.go filter: only check whether a child path could match when necessary 2020-10-07 20:47:52 +02:00
cmd_self_update.go Don't require self-update --output placeholder file 2020-10-03 07:02:23 +02:00
cmd_snapshots_test.go Regression test for #2979 2020-10-05 15:08:09 +02:00
cmd_snapshots.go snapshots: Make --json output [] instead of null when no snapshots 2020-10-05 13:14:10 +02:00
cmd_stats.go Add filter by tag and path to stats command 2020-08-30 17:14:48 +02:00
cmd_tag.go Merge pull request #2581 from aawsome/multiple-hostnames 2020-02-27 08:35:23 +01:00
cmd_unlock.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
cmd_version.go Add documentation on exit status codes to man pages 2020-02-12 23:09:26 +01:00
delete.go Don’t print too many messages when deleting files 2020-09-27 14:24:04 +02:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
exclude_test.go Support excluding files by size 2020-09-19 19:52:09 +08:00
exclude.go filter: only check whether a child path could match when necessary 2020-10-07 20:47:52 +02:00
find.go Fix display of warning about ignored filters 2020-08-30 17:14:56 +02:00
flags_test.go Moves files 2017-07-23 14:19:13 +02:00
format.go Dead code removal 2020-08-04 08:38:57 +02:00
global_debug.go Add profile build flag 2018-04-30 14:19:04 +02:00
global_release.go Add profile build flag 2018-04-30 14:19:04 +02:00
global_test.go Add test for --repository-file 2020-10-01 00:50:27 +02:00
global.go Replace repo/repos with repository/repositories in --no-lock help text 2020-10-06 22:49:48 +02:00
integration_fuse_test.go Support NetBSD without fuse 2018-06-16 15:55:04 +09:00
integration_helpers_test.go Remove a few unused variables 2020-09-05 10:06:23 +02:00
integration_helpers_unix_test.go integration tests: Redirect directory diff into intermediate buffer 2020-08-29 10:48:44 +02:00
integration_helpers_windows_test.go integration tests: Redirect directory diff into intermediate buffer 2020-08-29 10:48:44 +02:00
integration_test.go Merge pull request #2844 from aawsome/prune-integration-tests 2020-10-06 23:16:41 +02:00
local_layout_test.go Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
lock.go Replace fmt.Printf/Println/Fprintf with wrapper functions 2020-06-14 11:08:11 +02:00
main.go Don't read password for generate, help or self-update 2020-10-05 19:54:07 +02:00
progress.go Unify progress bar of check and prune commands 2020-08-25 22:47:38 +02:00
secondary_repo.go Correct data type for --repo2 option 2020-10-02 21:10:52 +02:00