Skip to content

maturin develop hardcodes compression level which adds signifinicant latency to the development loop #2622

@KarelPeeters

Description

@KarelPeeters

Overview

Recently, #2572 added an option --compression-level to the build subcommand, which can be used to lower the compression level to speed up the build flow. The specific reasoning in the original issue #2566 was related to distribution packages.

A similar reasoning applies to the develop subcommand: the artifacts that are build will only be used for local development, so their size is not that important. During local development iteration speed is a major concern, so disabling compression seems like a worthwhile tradeoff to me. The compression level for develop is currently hardcoded to 6 here:

compression_level: 6,

Benchmarks

For my current project changing the compression level to 0 lowers the time that maturin dev takes from 2.7s to 1.0s, a significant reduction.

Solutions

I see a couple possible solutions here:

  • Just hardcode the compression level to 0, under the assumption that no one really needs to configure.
  • Add a --compression-level option to the develop subcommand, similar to what was done for build. In this case I suggest that we set the default to 0, to speed up everyone's workflow by default.

I'd be happy to submit a PR that implements either of these choices, I don't have a strong preference for either one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions