mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-07-01 05:29:05 +02:00
Add jemalloc and jemalloc-auto features
Introduce the new features jemalloc (set jemalloc global allocator unconditionally) and jemalloc-auto (set jemalloc global allocator on musl-based targets to fix multithreaded performance, see [1]). Because cargo does not support target-specific features or feature defaults, the default is handled using a helper crate minedmap-default-alloc. [1] https://nickb.dev/blog/default-musl-allocator-considered-harmful-to-performance/
This commit is contained in:
parent
a25b3cdbd7
commit
1d9be9a41c
6 changed files with 77 additions and 1 deletions
|
@ -47,6 +47,7 @@ git-version = "0.3.5"
|
|||
image = { version = "0.25.1", default-features = false, features = ["png", "webp"] }
|
||||
indexmap = { version = "2.0.0", features = ["serde"] }
|
||||
lru = "0.13.0"
|
||||
minedmap-default-alloc = { version = "0.1.0", path = "crates/default-alloc", optional = true }
|
||||
minedmap-nbt = { version = "0.1.1", path = "crates/nbt", default-features = false }
|
||||
minedmap-resource = { version = "0.6.0", path = "crates/resource" }
|
||||
minedmap-types = { version = "0.1.4", path = "crates/types" }
|
||||
|
@ -64,5 +65,7 @@ tracing-subscriber = "0.3.17"
|
|||
zstd = "0.13.0"
|
||||
|
||||
[features]
|
||||
default = ["zlib-ng"]
|
||||
default = ["jemalloc-auto", "zlib-ng"]
|
||||
jemalloc-auto = ["dep:minedmap-default-alloc"]
|
||||
jemalloc = ["jemalloc-auto", "minedmap-default-alloc/jemalloc"]
|
||||
zlib-ng = ["minedmap-nbt/zlib-ng"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue