Skip to content

Commit 4fdc4c7

Browse files
committed
Increase buffer size
1 parent a38b239 commit 4fdc4c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/_pyrepl/unix_console.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,10 @@ def get_event(self, block: bool = True) -> Event | None:
369369
Returns:
370370
- Event: Event object from the event queue.
371371
"""
372+
BUFFER_SIZE = 1024*100
372373
if self.wait(timeout=0):
373374
try:
374-
chars = os.read(self.input_fd, 1024)
375+
chars = os.read(self.input_fd, BUFFER_SIZE)
375376
for char in chars:
376377
self.push_char(char)
377378
except OSError as err:
@@ -381,7 +382,7 @@ def get_event(self, block: bool = True) -> Event | None:
381382
while self.event_queue.empty():
382383
while True:
383384
try:
384-
chars = os.read(self.input_fd, 1024)
385+
chars = os.read(self.input_fd, BUFFER_SIZE)
385386
for char in chars:
386387
self.push_char(char)
387388
except OSError as err:

0 commit comments

Comments
 (0)