Skip to content
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

Align disk read/writes with the commonly used 4 kb block size #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion lib/net/sftp/operations/download.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def stack; @stack; end
def progress; @progress; end

# The default read size.
DEFAULT_READ_SIZE = 32_000
DEFAULT_READ_SIZE = 32_768

# The number of bytes to read at a time from remote files.
def read_size
Expand Down
2 changes: 1 addition & 1 deletion lib/net/sftp/operations/upload.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def progress; @progress; end
LiveFile = Struct.new(:local, :remote, :io, :size, :handle)

# The default # of bytes to read from disk at a time.
DEFAULT_READ_SIZE = 32_000
DEFAULT_READ_SIZE = 32_768

# The number of readers to use when uploading a single file.
SINGLE_FILE_READERS = 2
Expand Down