Skip to content

Reduce wheel size by omitting debug information #171

@marcelm

Description

@marcelm

I suggest to compile the Linux wheels with -g0 to reduce their size from 2.5 to ~0.5 MB.

The Linux wheels for zstandard are quite large at typically over 2 MB, especially compared to the Windows and macOS ones which have around 500 kB. The larger size seems to come from including debug information on Linux. To confirm this, I unpacked the .whl file manually, ran strip on the .so file and re-packed it. The resulting wheel has a size of just 400 kB.

I would like to suggest to pass CFLAGS=-g0 when creating the wheels, which leads to a similar size reduction. I have done this in multiple projects without detrimental effects.

See pycompression/python-isal#108.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions