reduce unnecessary syscall with --exclude-if-present
Bug #1466582 reported by
Kuang-che Wu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I found "duplicity --exclude-
Even $path is a file, it still try to determine the existence of $path/foo.
I have a backup set with about 300k files. After a complete backup, I ran "duplicity inc --dry-run" and measured the time.
real 203.47
user 157.37
sys 27.35
With my patch, which checks $path/foo only if $path is a dir.
real 191.20 (-6%)
user 149.70 (-4.8%)
sys 22.78 (-16.7%)
To post a comment you must log in.
--exclude- if-present foo is not intended for use in that manner. It's intended to allow users to exclude directories by including files within the directories and not having to include the directory names on the command line. So, if I have a couple of directories with files like so, /home/ken/ large-data1/ .exclude and /home/ken/ large-data2/ .exclude, and use the option --exclude- if-present .exclude then those directories will be excluded during the backup.