Skip to content

Tarfile is unnecessarily slow #121267

Closed
Closed

Description

@jforberg

Bug report

Bug description:

There is room for improvement in tarfile write performance. In a simple benchmark I find that tarfile spends most of its time doing repeated user name/group name queries.
https://gist.github.com/jforberg/86af759c796199740c31547ae828aef2

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    type-bug
    on Jul 2, 2024
  2. added 2 commits that reference this issue on Jul 2, 2024
  3. gaogaotiantian commented on Jul 2, 2024

    @gaogaotiantian
    Member

    Could you paste your cProfile output? I was a bit surprised that most of the time is spent on reading the pwd and grp.

  4. jforberg commented on Jul 2, 2024

    @jforberg
    ContributorAuthor

    @gaogaotiantian Here is the output:

    cprofile.txt

  5. added 2 commits that reference this issue on Jul 3, 2024
  6. added a commit that references this issue on Oct 30, 2024
  7. added
    type-feature
    performance
    stdlib
    and removed
    type-bug
    on Oct 30, 2024
  8. picnixz commented on Oct 30, 2024

    @picnixz
    Member

    Recategorizing this issue as per #121269 (comment).

  9. added a commit that references this issue on Dec 8, 2024
  10. added a commit that references this issue on Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancestdlibtype-feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions