-
-
Notifications
You must be signed in to change notification settings - Fork 338
Description
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:
Line 419 in fd59bd3
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 thedevelop
subcommand, similar to what was done forbuild
. In this case I suggest that we set the default to0
, 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.