Compression fails when using ionic zip

寵の児 提交于 2019-12-04 04:45:00
Kimi

I was facing a similar issue, with smaller zip files less than 20-25MB, it was taking 3-4 seconds, but anything larger than that, it was taking infinite time. Code never finished execution.

I started to worry that maybe it was the wrong decision to use DotNetZip library afterall, as we work with zipfiles upto 500MB.

Before the line where zip file is saved, I added: zip.ParallelDeflateThreshold = -1;

This makes sure that separate threads are never created. Looks like once the zip files goes past a certain threshold, DotNetZip keeps creating numerous threads causing a very large latency in obtaining the final zip file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!