Skip to content

Commit

Permalink
Increase file transfer chunk size from 4KB to 4MB (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
twizmwazin authored Jan 20, 2024
1 parent c085b0d commit ba79d66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/binharness/agentenvironment.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def inject_files(self: AgentEnvironment, files: list[tuple[Path, Path]]) -> None
).wait()
fd = self._client.file_open(self._id, str(dst), "wb")
with src.open("rb") as f:
while chunk := f.read(4096):
while chunk := f.read(4194304): # 4MB
self._client.file_write(self._id, fd, chunk)
self._client.file_close(self._id, fd)
local_attrs = src.stat()
Expand Down

0 comments on commit ba79d66

Please sign in to comment.