Compression does not work when using ion printing

I am using the latest ionic version of zip 1.9.1.8. I set the ionic zip property ParallelDeflateThreshold = 0 . The clasp mechanism has worked perfectly for the past two months. Suddenly, it stopped working. The zipper just hangs, the ion zip just created a tmp file and was unable to create a zip file. I could easily reproduce this problem even with a small file size.

My analysis for this problem is as follows

The problem was the latest version of ionic zip, in which case ionic zip was hanged when creating zip files. We noticed that several other users who use this DLL also reported errors on their site. Please refer link . This problem will be solved by disabling the ParallelThreshold property of the ionic zip, but this will delay performance for large log files, since it only works in one thread, and not in multi-threaded mode.

Now the problem has been resolved by setting the ParallelDeflateThreshold property to its default value. But I could not find the exact cause of this problem. Why does a crash happen suddenly? There were no changes in the car.

+7
source share
1 answer

I ran into a similar problem, with smaller zip files less than 20-25 MB, it took 3-4 seconds, but something more than that, it took infinite time. The code never exited.

I started to worry that maybe this was the wrong decision to use the DotNetZip afterall library, since we work with zip files up to 500 MB.

Before saving the zip file, I added: zip.ParallelDeflateThreshold = -1;

This ensures that separate threads are never created. It seems that as soon as the zip files pass a certain threshold, DotNetZip continues to create numerous streams, causing a very large delay in receiving the final zip file.

+15
source

All Articles