Skip to content

Commit 40450c0

Browse files
committed
Reading 64k per chunk
1 parent 77a05fd commit 40450c0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
hooks:
2222
- id: isort
2323
name: isort (python)
24-
language_version: '3.11'
24+
language_version: '3.8'
2525
args: ['--profile', 'black', '--filter-files']
2626
- repo: https://github.com/psf/black
2727
rev: '24.1.1'
@@ -31,6 +31,6 @@ repos:
3131
rev: v2.3.0
3232
hooks:
3333
- id: pycln
34-
language_version: '3.11'
34+
language_version: '3.8'
3535
args: [--all]
3636
exclude: ^tests/snapshot_tests

src/textual/driver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@ def save_file_thread():
239239
with open(save_path, mode) as destination_file:
240240
read = binary.read
241241
write = destination_file.write
242+
chunk_size = 1024 * 64
242243
while True:
243-
data = read(1024)
244+
data = read(chunk_size)
244245
if not data:
245246
break
246247
write(data)

0 commit comments

Comments
 (0)