Skip to content

LZMADecompressor is slow #327

@andiradulescu

Description

@andiradulescu

Using uv python install to install python 3.12.3, decompress is ~2x slower than Ubuntu 24.04 python3 and also pyenv installed python. Same python version.

For example:

uv installed python:

$ python -V
Python 3.12.3
$ python decompress.py
Time taken to decompress: 0.001038 seconds

system python (from ubuntu):

$ /usr/bin/python -V
Python 3.12.3
$ /usr/bin/python decompress.py
Time taken to decompress: 0.000400 seconds
$ uv python list --only-installed
cpython-3.12.3-linux-aarch64-gnu    /usr/local/uv/python/cpython-3.12.3-linux-aarch64-gnu/bin/python3 -> python3.12

Also tried the same thing on macOS, same python 3.12 installed with pyenv vs installed with uv and I noticed the same thing.

I made tests with decompress.py and with multiple other xz files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePotential performance improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions