diff --git a/ssgetpy/matrix.py b/ssgetpy/matrix.py index 97537fd..a5b8f09 100644 --- a/ssgetpy/matrix.py +++ b/ssgetpy/matrix.py @@ -39,6 +39,7 @@ class Matrix: `isspd` : True if this matrix is symmetric, positive definite `kind` : The underlying problem domain """ + CHUNK_SIZE = 16384 attr_list = [ "Id", @@ -203,10 +204,9 @@ def download(self, format="MM", destpath=None, extract=False): with open(localdest, "wb") as outfile, tqdm( total=content_length, desc=self.name, unit="B" ) as pbar: - for chunk in response.iter_content(chunk_size=4096): + for chunk in response.iter_content(chunk_size=self.CHUNK_SIZE): outfile.write(chunk) - pbar.update(4096) - time.sleep(0.1) + pbar.update(self.CHUNK_SIZE) if extract and (format == "MM" or format == "RB"): bundle.extract(localdest)