Skip to content

Clean up "performance allocators" and "performance flate2" backends#7686

Merged
konstin merged 1 commit intomainfrom
konsti/fewer-deps-rebase
Sep 25, 2024
Merged

Clean up "performance allocators" and "performance flate2" backends#7686
konstin merged 1 commit intomainfrom
konsti/fewer-deps-rebase

Conversation

@konstin
Copy link
Member

@konstin konstin commented Sep 25, 2024

Rebased version of #7000, description copied below.

Closes #7000


Summary

@charliermarsh has long suspected local builds could be made faster by disabling things like: tikv-jemalloc/mimalloc, zlibng etc.

I'm going through the cargo dep tree looking at things that can be disabled locally.

Methodology:

production cargo flag enables all the production stuff (good allocators, fast compression libs, etc.)

I measure fresh cargo check runs, like so:

rm -rf /tmp/timings; CARGO_TARGET_DIR=/tmp/timings cargo check -F production-memory-allocator --timings

Varying the -F to enable/disable the features

FAQ

Q: Why only check check?

A: The benefits will trickle down to other subcommands (including test/nextest etc.) — check/clippy are super common while iterating. We can do larger checks near the end.

Q: Why only check cold builds?

A: Warm builds depend on a lot on which part of the code is touched — I'll optimize typical interactions later on.

Instead of having conditional cargo dependencies in both uv-dev and uv,
and different `--features` invocations in CI, this introduces a series of
`uv-performance-*` crates that do the right thing.

These are enabled by default, but can be disabled when working on correctness
alone, locally.
@konstin konstin enabled auto-merge (squash) September 25, 2024 14:34
@fasterthanlime
Copy link
Contributor

Windows CI is being flaky again :(

@konstin konstin merged commit f5601e2 into main Sep 25, 2024
@konstin konstin deleted the konsti/fewer-deps-rebase branch September 25, 2024 15:41
konstin added a commit that referenced this pull request May 2, 2025
#5577 fixed a bug on macos due to dynamically linking lzma/xz through static linking. In #7686, this feature was moved to the performance category.

This PR moves the `xz2/static` back to the general default features, and, inspired by Homebrew/homebrew-core#222211, it structures and documents the feature flags cleaner
zanieb added a commit that referenced this pull request May 2, 2025
#5577 fixed a bug on macos due to dynamically linking lzma/xz through
static linking. In #7686, this feature was moved to the performance
category.

This PR moves the `xz2/static` back to the general default features,
and, inspired by Homebrew/homebrew-core#222211,
it structures and documents the feature flags cleaner.

We need to take care that this feature does not accidentally disable
features we want.

---------

Co-authored-by: Zanie Blue <contact@zanie.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments