title: Python zip extraction very slow. Manual extraction is fast
body: <p>I am using the following code to download and extract a zip file ~250MB.</p>
  <pre><code>from pathlib import Path
  import os
  import requests
  from zipfile import ZipFile
  import traceback
  import sys
  
  data_path = os.path.join(&quot;.&quot;, &quot;data&quot;)
  Path(data_path).mkdir(parents=True, exist_ok=True)  # assuming Python &gt;= 3.5
  url_str = 'https://www.cs.ucr.edu/~eamonn/time_series_data_2018/UCRArchive_2018.zip'
  zip_out_path = os.path.join(data_path, &quot;UCRArchive_2018.zip&quot;)
  
  if not os.path.exists(zip_out_path):
      try:
          print(&quot;starting to download dataset zip&quot;)
          file_content = requests.get(url_str, timeout=10, verify=False).content
      except requests.RequestException as ex:
          traceback.print_exc(ex)
          sys.stderr.write(r&quot;Auto download failed. For manual download see ./zip_password.txt&quot;)
          raise
      print(&quot;downloaded dataset zip. Takes ~1min&quot;)
      print(&quot;writing zip.&quot;)
      with open(zip_out_path, 'wb') as out_file:
          out_file.write(file_content)
  
  print(&quot;extracting zip. Takes several minutes, manual is fast.&quot;)
  with ZipFile(zip_out_path, 'r') as zip_ref:
      zip_ref.extractall(data_path, pwd=b&quot;someone&quot;)
  print(&quot;done extracting.&quot;)
  </code></pre>
  <p>The file gets downloaded, but the extraction is <strong>extremely</strong> slow.</p>
  <p>When manually extracting it (double click, extract), everything works fine.</p>
  <p><strong>What is happening and how to fix this?</strong></p>