[
  {
    "Id": "167824",
    "ThreadId": "50133",
    "Html": "Hello,<br>\r\n<br>\r\nI have written a small application that uses DotNetZip for zipping files. The program runs on a computer with 2-Core CPU. According to task manager during zipping CPU usage is 50% Does it mean that the library uses only one core? Is it possible for the library to use both cores?<br>\r\n<br>\r\nThanks. \r\n",
    "PostedDate": "2009-03-13T10:25:38.017-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "167831",
    "ThreadId": "50133",
    "Html": "Yes, that is exactly what you are seeing.  There's an open work item to modify the library so that it exploits multiple cores and multiple processors.  <a href=\"http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=5183\">http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=5183</a> <br>\r\nAnd also, there is ongoing work to improve the performance of the compressor.  \r\n",
    "PostedDate": "2009-03-13T10:44:07.657-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "168082",
    "ThreadId": "50133",
    "Html": "What about using <span></span><a href=\"http://www.codeproject.com/kb/cs/aforge_parallel.aspx\">AForge.Net</a> for parallel computations? It work on .Net framwork 2.0 I think it would be quite useful for users if the library uses multiple cores as nowadays most of the computers have multicore CPU<br>\r\n",
    "PostedDate": "2009-03-14T07:11:41.4-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "170487",
    "ThreadId": "50133",
    "Html": "Thanks for the suggestion, I will check it out. <br>\r\nIn the meantime, I updated the workitem having to do with multi-core/multi-cpu optimization.  <a href=\"http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=5183\"><span style=\"color:#3e62a6\">http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=5183</span></a> <br>\r\nThe short story is that I am doing some R&amp;D work for parallelizing the deflation.  On my dual-core 1p machine I was about to reduce the compression time to roughly 55-58% of the time required in the single-threaded approach used in v1.7 od DotNetZip. <br>\r\n<br>\r\nThis is a pretty good jump in performance.  It would mean little to no change in the API of DotNetZip.  <br>\r\n",
    "PostedDate": "2009-03-21T23:10:22.13-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "452453",
    "ThreadId": "50133",
    "Html": "Cheeso,\r\n\r\nI do love this library!  It took very little time to get a utility up and running.  By the way, is the DLL threadsafe?  If I call t a dozen times from my own threads will it work correctly?  I assume so.\r\n\r\nWhile I appreciate the use of multiple threads, it actually becomes a problem when used on servers.  I am currently using it on a SQL Server machine with quad cores, and it maxes out all four cores.  Obviously this is ... an issue.  I am about to upgrade this server to one of those 8 or 12 core AMD procs and I truly do NOT want DotNetZip grabbing all 12 cores for compression.  If you think about it, moving from 2 to 3 cores gives you a 50% speed bump (all else equal).  Moving from 7 to 8 cores gives you only a 12% speed bump.  Much less noticible or useful\r\n\r\nMy suggestion would be to give us a property to set the max threads.  Then I could decide how many cores I want used for the zip operation.\r\n\r\nBy the way, I spent the weekend zipping up 200 gigs of stuff using the utility we wrote (using DotNetZip) and for my stuff got about an 80% compression.  LOTS of room saved.  Further we integrated DotNetZip into a process I run that exports huge SQL Server tables to CSV and imports back in the processed CSVs.  These table processes leave behind gigabytes of text files that I need to archive (can't just delete) and now I am getting about 80% compression on those as well.  \r\n\r\nAgain though, Kudos on what you have done!  Really cool!\r\n\r\n",
    "PostedDate": "2010-06-07T07:05:28.18-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "455416",
    "ThreadId": "50133",
    "Html": "<p>yes,&nbsp;the library is&nbsp;thread safe, but the ZipFile class is not threadsafe.</p>\r\n<p>Each instance of the ZipFile class should be used by only one thread.</p>\r\n<p>To limit the parallel compressing - consider setting ZipFile.ParallelDeflateThreshold to -1.&nbsp; Check the documentation on that property for more info.</p>\r\n<p>I agree though - it would be nice to have an upper limit.</p>",
    "PostedDate": "2010-06-14T15:25:25.423-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "455417",
    "ThreadId": "50133",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/workitem/11065\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2010-06-14T15:26:09.193-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]