Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Zip multiple files and directories performance hit

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #19830 |

    We are using version 3.5 to compress multiple folders and files (for this example a little over 3000 files – total 8MB). most files are text, xml, maybe a few pictures – all between 1k-500k.
    the zip process takes up to 30 seconds. using the windows shell sendTo->Compressed folder it will take just up to 8-10 seconds.

    we are following the basic example provided with the documentation (i.e. diskFolder, zipArchive, CopyFilesTo, BeginEdit, EndUpdate etc.)

    any best practices regarding performance? this is a major performence hit and became the bottleneck of our product.

    I should probably mention that the scenario described above is the simplest one we encounter – most of the work done as at least 10 times more complex and the zip duration is multiplied accordingly.

    thank you for your reply.

    Imported from legacy forums. Posted by picho (had 3950 views)

    Xceed Support
    Member
    Post count: 5658

    There is not much more I can suggest to enhance the performance. You are already using the BeginUpdate and EndUpdate statements. If you have a lot of already compressed files (like .jpg), use the “Stored” compression method for them. You could also, to increase speed, put the compression level to the lowest (The compression ratio does not change that much. You only lose a couple of %.).

    Keep in mind that this is 100% managed code. The .NET Framework overhead is quite heavy. If you do not mind using ActiveX component, you could use our Zip Compression Library (It is faster then our .NET component (It is programmed in C++)).

    e.g.,
    <code>
    private static void multipleCompressionFormat108686()
    {
    AbstractFile file1 = new DiskFile( @”D:\Test.txt” );
    AbstractFile file2 = new DiskFile( @”D:\Picture.jpg” );
    AbstractFile zipFile = new DiskFile( @”D:\Archive108642.zip” );

    ZipArchive archive = new ZipArchive( zipFile );

    archive.BeginUpdate();
    archive.DefaultCompressionMethod = CompressionMethod.Deflated;
    archive.DefaultCompressionLevel = CompressionLevel.Lowest;
    file1.CopyTo( archive, true );

    archive.DefaultCompressionMethod = CompressionMethod.Stored;
    archive.DefaultCompressionLevel = CompressionLevel.None;
    file2.CopyTo( archive, true );

    archive.EndUpdate();
    }
    </code>

    Imported from legacy forums. Posted by CharlesB (had 269 views)

    User (Old forums)
    Member
    Post count: 23064

    Please help, I try to enchance performance and I try to use your sample – setup defaultcompressionmethod
    I am getting the following error:
    Reference required to assembly ‘Xceed.Compression, Version=3.6.7614.12380, Culture=neutral, PublicKeyToken=ba83ff368b7563c6’ containing the type ‘Xceed.Compression.CompressionMethod’. Add one to your project.

    I do have refernce to Xceed component in my project ( I use .net 2.0)

    What else should I install/add
    Thanks

    Imported from legacy forums. Posted by Milla (had 452 views)

    Xceed Support
    Member
    Post count: 5658

    You need to have all those <a href=”http://doc.xceedsoft.com/products/XceedFileSystem/Redistributable_files.html”&gt;.dlls</a> included:

    Xceed.Zip.DLL
    Xceed.FileSystem.DLL
    Xceed.Compression.DLL
    Xceed.Compression.Formats.DLL

    It should resolve your issue.

    Imported from legacy forums. Posted by CharlesB (had 4334 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.