Skip to content

bpo-43785: Improve BZ2File performance #25299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 12, 2021
Merged

Conversation

methane
Copy link
Member

@methane methane commented Apr 9, 2021

methane added 2 commits April 9, 2021 14:47
* Remove `RLock` from `BZ2File`. It makes `BZ2File` to thread unsafe, but
  gzip and lzma don't use it too.
* Added `BZ2File.__iter__()` method which delegate to
  `self._buffer.__iter__()`. It is much faster than calling
  `BZ2File.readline()` for each lines.
@methane methane added the performance Performance or resource usage label Apr 9, 2021
@gpshead gpshead self-requested a review April 11, 2021 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants