Skip to content

Conversation

@c-w
Copy link
Contributor

@c-w c-w commented Dec 7, 2021

This pull request optimizes the code to download the release tarball with two changes:

  1. Use context managers to automatically close the output file and HTTP response object removing the need for an explicit close call and handling the resource cleanup in cases of unexpected crashes, etc.
  2. Instead of reading the entire response into memory, download it in chunks and write to the output file as the chunks arrive, curtsy of shutil.copyfileobj.

@wlav wlav merged commit 83589ae into wlav:master Dec 7, 2021
@c-w c-w deleted the improve-download branch December 7, 2021 19:59
sudo-panda pushed a commit to sudo-panda/cppyy-backend that referenced this pull request Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants