par2: purge is very slow
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Hi,
I'm using par2+dpbx right now. And found that par2 implementation of '_delete' is very slow.
The root cause is that par2 asks "wrapped_
AT the same time it'll work much faster for backends with "_delete_list". since _query will be called only once for whole list.
I see three possible solutions here:
1. implement dummy _delete_list in dpbx backend. There is no API for bulk deletion, so my implementation will just iterate over list and call _delete for every item.
2. Implement _delete_list in PAR2 that will call _delete if _delete_list is not implemented in wrapped backend.
Any suggestions which one is better?
Changed in duplicity: | |
importance: | Undecided → Medium |
milestone: | none → 0.7.08 |
status: | New → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |
See attachment for proposed fix. It always adds _delete_list to Par2Backend. And _delete_list fallbacks to _delete calls if wrapped backend has no _delet_list.
I've compared it on very small 18-volume backup of duplicity source code (--volsize=2 --no-encryption).
Full backups: 2 (deleting one of them)
before: 40.927 secs
fixed : 36.076 secs
Full backups: 25 (deleting one of them)
before: 1:55.27 total
fixed : 50.213 total