From 21ce31fe7dee8a5002417f7d3c7eddb87d6a13a4 Mon Sep 17 00:00:00 2001 From: Pure White <wudi.daniel@bytedance.com> Date: Wed, 19 Apr 2023 20:14:16 +0800 Subject: [PATCH] feat: change zero copy threshold to 0 (#141) --- Cargo.lock | 2 +- pilota/Cargo.toml | 2 +- pilota/src/thrift/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a3d10735..f134379c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -645,7 +645,7 @@ dependencies = [ [[package]] name = "pilota" -version = "0.6.0" +version = "0.6.1" dependencies = [ "anyhow", "async-recursion", diff --git a/pilota/Cargo.toml b/pilota/Cargo.toml index b1ce0046..3930af76 100644 --- a/pilota/Cargo.toml +++ b/pilota/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pilota" -version = "0.6.0" +version = "0.6.1" edition = "2021" description = "Pilota is a thrift and protobuf implementation in pure rust with high performance and extensibility." documentation = "https://docs.rs/pilota" diff --git a/pilota/src/thrift/mod.rs b/pilota/src/thrift/mod.rs index 5defa714..f70e9dfd 100644 --- a/pilota/src/thrift/mod.rs +++ b/pilota/src/thrift/mod.rs @@ -17,7 +17,7 @@ use faststr::FastStr; pub use self::{binary::TAsyncBinaryProtocol, compact::TAsyncCompactProtocol}; const MAXIMUM_SKIP_DEPTH: i8 = 64; -const ZERO_COPY_THRESHOLD: usize = 4 * 1024; // 4KB +const ZERO_COPY_THRESHOLD: usize = 0; // Change it to 0 to test the performance. Previously it's 4KB. const INLINE_CAP: usize = 22; lazy_static::lazy_static! {