This project is read-only.

Compression is EXTREMELY slow

Jan 14, 2013 at 7:52 PM

Hi,

Having spent days getting the extraction and progress reporting working very well, I am now faced with a ludicrously slow compression speed.

The source files consist of 2,700 files taking up about 34 meg.

Here's my code:

 

        destinationPath = destinationPath + fileName + ".7z";
        zipfile = fileName + ".zip";
        bool recurseSubdirectories = false;

        //SevenZipCompressor.SetLibraryPath(@"C:\Program Files (x86)\7-Zip\7z.dll");
        string appPath = Path.Combine(Application.StartupPath, "7z64.dll");
        SevenZipCompressor.SetLibraryPath(appPath);
        SevenZipCompressor cmp = new SevenZipCompressor();
        cmp.Compressing += new EventHandler<ProgressEventArgs>(cmp_Compressing);
        cmp.FileCompressionStarted += new EventHandler<FileNameEventArgs>(cmp_FileCompressionStarted);
        cmp.CompressionFinished += new EventHandler<EventArgs>(cmp_CompressionFinished);
        cmp.ArchiveFormat = OutArchiveFormat.SevenZip;
        //(OutArchiveFormat)Enum.Parse(typeof(OutArchiveFormat), cb_Format.Text);
        cmp.CompressionLevel = CompressionLevel.Normal; // = (CompressionLevel)trb_Level.Value;
        cmp.CompressionMethod = CompressionMethod.Default; // = (CompressionMethod)cb_Method.SelectedIndex;
        //cmp.VolumeSize  = chb_Volumes.Checked ? (int)nup_VolumeSize.Value : 0;
        //string directory = tb_CompressDirectory.Text;
        //string archFileName = tb_CompressOutput.Text;
        //bool sfxMode = chb_Sfx.Checked;

        string sourceRootDirectory = "";

        if (fileName.StartsWith("MCOnline"))
        {
          string htdocsDirectory = string.Format(@"{0}webserver\htdocs", iaCurrentDistDirectory);
          sourceRootDirectory = htdocsDirectory;
          //cmp. zippy.IncludeFiles(string.Format(@"{0}\*", htdocsDirectory));
          recurseSubdirectories = true;
        }

        
        cmp.BeginCompressDirectory(sourceRootDirectory, zipfile, "frd", "*", recurseSubdirectories);

Any suggestions/comments will be appreciated.

This is show stopper for me <sigh> ...