Skip to content
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

Optimize tarfile uncompression performance #78224

Closed
methane opened this issue Jul 4, 2018 · 2 comments
Closed

Optimize tarfile uncompression performance #78224

methane opened this issue Jul 4, 2018 · 2 comments
Labels
3.8 only security fixes performance Performance or resource usage stdlib Python modules in the Lib dir

Comments

@methane
Copy link
Member

methane commented Jul 4, 2018

BPO 34043
Nosy @gustaebel, @methane, @serhiy-storchaka
PRs
  • bpo-34043: Optimize tarfile uncompress performance #8089
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-07-06.07:31:24.312>
    created_at = <Date 2018-07-04.12:10:32.516>
    labels = ['3.8', 'library', 'performance']
    title = 'Optimize tarfile uncompression performance'
    updated_at = <Date 2018-07-06.07:31:24.311>
    user = 'https://github.com/methane'

    bugs.python.org fields:

    activity = <Date 2018-07-06.07:31:24.311>
    actor = 'methane'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-07-06.07:31:24.312>
    closer = 'methane'
    components = ['Library (Lib)']
    creation = <Date 2018-07-04.12:10:32.516>
    creator = 'methane'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34043
    keywords = ['patch']
    message_count = 2.0
    messages = ['321039', '321148']
    nosy_count = 3.0
    nosy_names = ['lars.gustaebel', 'methane', 'serhiy.storchaka']
    pr_nums = ['8089']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'performance'
    url = 'https://bugs.python.org/issue34043'
    versions = ['Python 3.8']

    @methane methane added 3.8 only security fixes stdlib Python modules in the Lib dir performance Performance or resource usage labels Jul 4, 2018
    @methane
    Copy link
    Member Author

    methane commented Jul 4, 2018

    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.

    @methane
    Copy link
    Member Author

    methane commented Jul 6, 2018

    New changeset 8d13091 by INADA Naoki in branch 'master':
    bpo-34043: Optimize tarfile uncompress performance (GH-8089)
    8d13091

    @methane methane closed this as completed Jul 6, 2018
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 only security fixes performance Performance or resource usage stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant