Skip to content

feat: change buffer size to 32KB #432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dragonfly-client-storage/src/content.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions dragonfly-client/src/proxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<BoxBody<Bytes, ClientError>>;
Expand Down