Skip to content

Stored (uncompressed) ZipExtFile in zipfile can be seekable at lower cost #88339

Closed

Description

@JuniorJPDJ
BPO 44173
Nosy @Yhg1s, @gpshead, @serhiy-storchaka, @JuniorJPDJ
PRs
  • bpo-44173: better approach for seeking in non-compressed ZipExtFile #26227
  • gh-88339: enable fast seeking of uncompressed unencrypted zipfile.ZipExtFile #27737
  • 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 = 'https://github.com/gpshead'
    closed_at = None
    created_at = <Date 2021-05-19.02:28:39.857>
    labels = ['type-feature', 'library', '3.11']
    title = 'Stored (uncompressed) ZipExtFile in zipfile can be seekable at lower cost'
    updated_at = <Date 2021-08-18.17:30:30.110>
    user = 'https://github.com/JuniorJPDJ'

    bugs.python.org fields:

    activity = <Date 2021-08-18.17:30:30.110>
    actor = 'gregory.p.smith'
    assignee = 'gregory.p.smith'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2021-05-19.02:28:39.857>
    creator = 'juniorjpdj'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44173
    keywords = ['patch']
    message_count = 1.0
    messages = ['393918']
    nosy_count = 5.0
    nosy_names = ['twouters', 'gregory.p.smith', 'alanmcintyre', 'serhiy.storchaka', 'juniorjpdj']
    pr_nums = ['26227', '27737']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue44173'
    versions = ['Python 3.11']

    Activity

    1. JuniorJPDJ commented on May 19, 2021

      JuniorJPDJmannequin
      MannequinAuthor

      At the moment stored ZipExtFile is being read to the place of seek like all other compressed variants.
      It's not needed as it's possible to freely seek uncompressed file inside zip without this penalty.

      Lots of apps depend on ZipExtFile seeking ability and it would lower performance and IO penalty significantly.

      I've POC patch created.
      It disables CRC checking after first seek as it's impossible to check CRC if we are not reading whole file.

    2. added
      3.11only security fixes
      stdlibStandard Library Python modules in the Lib/ directory
      type-featureA feature request or enhancement
      on May 19, 2021
    3. transferred this issue fromon Apr 10, 2022
    4. added a commit that references this issue on Aug 6, 2022
    5. added
      3.12only security fixes
      and removed
      3.11only security fixes
      on Aug 6, 2022
    6. gpshead commented on Aug 6, 2022

      @gpshead
      Member

      merged for 3.12. thanks for the contribution!

    7. added a commit that references this issue on Aug 11, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.12only security fixesstdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions