chore: Use mimalloc; 2x faster than glib malloc
This commit is contained in:
parent
846c4106f8
commit
34c75cc2b9
3 changed files with 25 additions and 0 deletions
19
Cargo.lock
generated
19
Cargo.lock
generated
|
|
@ -799,6 +799,15 @@ version = "0.2.121"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f"
|
||||
|
||||
[[package]]
|
||||
name = "libmimalloc-sys"
|
||||
version = "0.1.24"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7705fc40f6ed493f73584abbb324e74f96b358ff60dfe5659a0f8fc12c590a69"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "locale_config"
|
||||
version = "0.3.0"
|
||||
|
|
@ -869,6 +878,15 @@ dependencies = [
|
|||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mimalloc"
|
||||
version = "0.1.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b0dfa131390c2f6bdb3242f65ff271fcdaca5ff7b6c08f28398be7f2280e3926"
|
||||
dependencies = [
|
||||
"libmimalloc-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mime"
|
||||
version = "0.3.16"
|
||||
|
|
@ -1153,6 +1171,7 @@ name = "pop-launcher-bin"
|
|||
version = "1.2.0"
|
||||
dependencies = [
|
||||
"dirs 4.0.0",
|
||||
"mimalloc",
|
||||
"pop-launcher-plugins",
|
||||
"pop-launcher-service",
|
||||
"tokio",
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ pop-launcher-service = { path = "../service" }
|
|||
tracing = "0.1.32"
|
||||
tracing-subscriber = { version = "0.3.9", features = ["env-filter"] }
|
||||
dirs = "4.0.0"
|
||||
mimalloc = "0.1.28"
|
||||
|
||||
[dependencies.tokio]
|
||||
version = "1.17.0"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,11 @@
|
|||
use pop_launcher_plugins as plugins;
|
||||
use pop_launcher_service as service;
|
||||
|
||||
use mimalloc::MiMalloc;
|
||||
|
||||
#[global_allocator]
|
||||
static GLOBAL: MiMalloc = MiMalloc;
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
async fn main() {
|
||||
if let Some(plugin) = std::env::args().next() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue