Skip to content

Commit

Permalink
perf: Use mimalloc for better performance on alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
kinkard committed Feb 11, 2025
1 parent 9e8afa7 commit 3480ee6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ lto = "thin"
anyhow = "1"
dotenv = "0.15"
futures = "0.3"
mimalloc = { version = "*" }
rusqlite = { version = "0.33", features = ["bundled"] }
smallvec = { version = "1", features = ["union"] }
tokio = { version = "1", features = ["rt-multi-thread"] }
Expand Down
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ mod storage;
mod track_info;
mod yt_dlp;

#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;

struct Data {
yt_dlp_resolver: yt_dlp::Resolver,
radio_t_resolver: radiot::Resolver,
Expand Down

0 comments on commit 3480ee6

Please sign in to comment.