From 3f01cb4b5f99c8c1a42148db508b915b7997509f Mon Sep 17 00:00:00 2001 From: Gaius Date: Mon, 29 Apr 2024 10:59:07 +0800 Subject: [PATCH] feat: change buffer size to 32KB Signed-off-by: Gaius --- dragonfly-client-storage/src/content.rs | 4 ++-- dragonfly-client/src/proxy/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dragonfly-client-storage/src/content.rs b/dragonfly-client-storage/src/content.rs index cf608463..5bb04a76 100644 --- a/dragonfly-client-storage/src/content.rs +++ b/dragonfly-client-storage/src/content.rs @@ -27,8 +27,8 @@ use tracing::{error, info, warn}; // DEFAULT_DIR_NAME is the default directory name to store content. const DEFAULT_DIR_NAME: &str = "content"; -// DEFAULT_BUFFER_SIZE is the buffer size to read and write, default is 2MB. -const DEFAULT_BUFFER_SIZE: usize = 2 * 1024 * 1024; +// DEFAULT_BUFFER_SIZE is the buffer size to read and write, default is 32KB. +const DEFAULT_BUFFER_SIZE: usize = 32 * 1024; // Content is the content of a piece. pub struct Content { diff --git a/dragonfly-client/src/proxy/mod.rs b/dragonfly-client/src/proxy/mod.rs index 7987c420..3af0d84f 100644 --- a/dragonfly-client/src/proxy/mod.rs +++ b/dragonfly-client/src/proxy/mod.rs @@ -65,8 +65,8 @@ use tracing::{error, info, instrument, Span}; pub mod header; -// DEFAULT_BUFFER_SIZE is the buffer size to read and write, default is 2MB. -const DEFAULT_BUFFER_SIZE: usize = 2 * 1024 * 1024; +// DEFAULT_BUFFER_SIZE is the buffer size to read and write, default is 32KB. +const DEFAULT_BUFFER_SIZE: usize = 32 * 1024; // Response is the response of the proxy server. pub type Response = hyper::Response>;