From af72a9c6576cab16128a89d3c9cd5f57cd0d2504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 19 May 2023 15:10:33 +0200 Subject: Revert "perf: use jemalloc as global allocator (#18957)" (#19187) This reverts commit 798c1ad0f1de80ff0e7196b6140a3f74e31fe111. Reverting because this change caused a spike in memory usage, but we can't fully realise gains from lower GC pressure from more optimal malloc/ free provided by "jemalloc". We might revisit the topic in future. --- Cargo.lock | 21 --------------------- Cargo.toml | 2 -- cli/Cargo.toml | 3 --- cli/main.rs | 7 ------- 4 files changed, 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 725e8362d..483ed55fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -784,7 +784,6 @@ dependencies = [ "text-size", "text_lines", "thiserror", - "tikv-jemallocator", "tokio", "tokio-util", "tower-lsp", @@ -5164,26 +5163,6 @@ dependencies = [ "syn 2.0.13", ] -[[package]] -name = "tikv-jemalloc-sys" -version = "0.5.3+5.3.0-patched" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "tikv-jemallocator" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20612db8a13a6c06d57ec83953694185a367e16945f66565e8028d2c0bd76979" -dependencies = [ - "libc", - "tikv-jemalloc-sys", -] - [[package]] name = "time" version = "0.3.20" diff --git a/Cargo.toml b/Cargo.toml index 814bd6d22..916248d9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -134,8 +134,6 @@ tar = "=0.4.38" tempfile = "3.4.0" thiserror = "1.0.40" tokio = { version = "1.28.1", features = ["full"] } -tikv-jemallocator = "0.5.0" -tikv-jemalloc-sys = "0.5.3" tokio-rustls = "0.24.0" tokio-util = "0.7.4" tower-lsp = { version = "=0.17.0", features = ["proposed"] } diff --git a/cli/Cargo.toml b/cli/Cargo.toml index b1da79b82..59cabd915 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -120,9 +120,6 @@ winapi = { workspace = true, features = ["knownfolders", "mswsock", "objbase", " [target.'cfg(unix)'.dependencies] nix.workspace = true -[target.'cfg(not(target_env = "msvc"))'.dependencies] -tikv-jemallocator.workspace = true - [dev-dependencies] deno_bench_util.workspace = true dotenv = "=0.15.0" diff --git a/cli/main.rs b/cli/main.rs index 031ab07e0..73820cb93 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -26,13 +26,6 @@ mod version; mod watcher; mod worker; -#[cfg(not(target_env = "msvc"))] -use tikv_jemallocator::Jemalloc; - -#[cfg(not(target_env = "msvc"))] -#[global_allocator] -static GLOBAL: Jemalloc = Jemalloc; - use crate::args::flags_from_vec; use crate::args::DenoSubcommand; use crate::args::Flags; -- cgit v1.2.3