classification
Title: Optimize tarfile uncompression performance
Type: performance Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: inada.naoki, lars.gustaebel, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2018-07-04 12:10 by inada.naoki, last changed 2018-07-06 07:31 by inada.naoki. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8089 closed inada.naoki, 2018-07-04 12:20
Messages (2)
msg321039 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2018-07-04 12:21
tarfile._Stream has two buffer for compressed and uncompressed data.
Those buffers are not aligned so unnecessary bytes slicing happens
for every reading chunks.

This commit bypass compressed buffering.

In this benchmark [1], user time become 250ms from 300ms.

[1]: https://bugs.python.org/msg320763
msg321148 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2018-07-06 05:06
New changeset 8d130913cb9359c01de412178f9942419e921170 by INADA Naoki in branch 'master':
bpo-34043: Optimize tarfile uncompress performance (GH-8089)
https://github.com/python/cpython/commit/8d130913cb9359c01de412178f9942419e921170
History
Date User Action Args
2018-07-06 07:31:24inada.naokisetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-07-06 05:06:04inada.naokisetmessages: + msg321148
2018-07-04 13:02:30serhiy.storchakasetnosy: + lars.gustaebel, serhiy.storchaka
2018-07-04 12:21:11inada.naokisetmessages: + msg321039
2018-07-04 12:20:05inada.naokisetkeywords: + patch
stage: patch review
pull_requests: + pull_request7690
2018-07-04 12:10:32inada.naokicreate