Merge lp:~mwilck/duplicity/duplicity into lp:~duplicity-team/duplicity/0.8-series
Proposed by
Martin Wilck
Status: | Merged |
---|---|
Merged at revision: | 1116 |
Proposed branch: | lp:~mwilck/duplicity/duplicity |
Merge into: | lp:~duplicity-team/duplicity/0.8-series |
Diff against target: |
74 lines (+19/-18) 2 files modified
duplicity/globmatch.py (+16/-12) duplicity/selection.py (+3/-6) |
To merge this branch: | bzr merge lp:~mwilck/duplicity/duplicity |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kenneth Loafman | Approve | ||
Review via email: mp+301268@code.launchpad.net |
Description of the change
Glob matching in current duplicity uses a selector function that calls path_matches_
My proposed patches create a closure function instead that uses precalculated regular expressions; the regular expressions are thus constructed only once at initialization time.
This change speeds up duplicity a *lot* when complex include/exclude lists are in use: for my use case (dry-run, backup of an SSD filesystem), the speedup is a factor of 25 (runtime: 4s rather than 90s).
To post a comment you must log in.
The same change can be trivially merged into the 0.7 series, providing a similar speed-up. I did that in lp:~mwilck/duplicity/0.7-series. I'll postpone officially requesting this merge until someone has commented here.