This project is read-only.

Performance when deleting files

Mar 3, 2009 at 12:32 PM
Edited Mar 3, 2009 at 1:21 PM
Hi Folks,

(See my previous post) I am working with large zip files containing >200.000 files in which I want to delete (for instance) 10.000 files. I do this using the ZipFile.RemoveEntry(filename) method. The first 1000 files are deleted rather fast but after that deleting becomes slower should I use a different approach? Could it be possible to add a removeMultipleEntries or specify a wildcard?


Mar 3, 2009 at 3:32 PM
I like the idea of allowing the removal of a selection of entries.  I think that is a very good idea.  It will make things easier, but I don't know if it will solve your performance/speed problems.  With that many entries, it could simply be a matter of memory management and garbage collection.
Have you looked at v1.8.1.3 of the library? - it exposes new Selection methods for Adding files and and Extracting entries. 

For example, you can call    AddSelectedFiles("*.txt")    to add a selection of files to a zip file, or ExtractSelected("*.mp3") to extract a selection of files from a zip file.

I think adding a RemoveSelected() method makes a lot of sense. I hadn't thought of it until now.
Mar 3, 2009 at 3:33 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.