par2: purge is very slow

Bug #1586992 reported by Dmitry Nezhevenko
14
This bug affects 3 people
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_backend._query" for every _delete call. And _query is not fast for large amount of files.

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?

Revision history for this message
Dmitry Nezhevenko (dmitry.nezhevenko) wrote :

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

Changed in duplicity:
importance: Undecided → Medium
milestone: none → 0.7.08
status: New → Fix Committed
Changed in duplicity:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.