diff options
| author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-05-02 20:17:11 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-02 20:17:11 +0530 |
| commit | 022aae9854bed6219d75eeb82fcf46652c21050d (patch) | |
| tree | 1f0cfa03c8510d5dcca825ebbb3e539be7aef58f /Cargo.lock | |
| parent | 97147faf891dce8d77bc829cbd0ebc1afebb2575 (diff) | |
perf(core): use jemalloc for V8 array buffer allocator (#18875)
This commits changes "deno_core" to use jemalloc allocator as an
allocator
for V8 array buffers. This greatly improves our GC characteristics as we
are using
a lot of short lived array buffers. They no longer go through the
expensive
malloc/free cycle using the default Rust allocator, but instead use
jemallocator's
memory pool.
As a result the flamegraphs for WS/HTTP server flamegraphs no longer
show
stacks for malloc/free around ops that use ZeroCopyBuf and &[u8].
---------
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'Cargo.lock')
| -rw-r--r-- | Cargo.lock | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock index 77b6c0cbb..f4647350b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -875,6 +875,7 @@ dependencies = [ "serde_v8", "smallvec", "sourcemap", + "tikv-jemalloc-sys", "tokio", "url", "v8", @@ -5131,6 +5132,16 @@ dependencies = [ ] [[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 = "time" version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" |
