From fd43a64437a4fa1116b4848deb93364e5a2640ce Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Fri, 15 Dec 2023 21:09:33 -0700 Subject: [PATCH] FIX: Remove runloop execution while waiting for stdin This would slow down the typing at a command prompt while waiting for stdin from the programs because each character would bounce for 0.01 seconds adding up to noticeable slowdown when piping in characters from an external source. --- src/_macosx.m | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/_macosx.m b/src/_macosx.m index a580362f676f..d39f37063c9e 100755 --- a/src/_macosx.m +++ b/src/_macosx.m @@ -89,9 +89,6 @@ static int wait_for_stdin() { if (!event) { break; } [NSApp sendEvent: event]; } - // We need to run the run loop for a short time to allow the - // events to be processed and keep flushing them while we wait for stdin - [[NSRunLoop currentRunLoop] runUntilDate: [NSDate dateWithTimeIntervalSinceNow: 0.01]]; } // Remove the input handler as an observer [[NSNotificationCenter defaultCenter] removeObserver: stdinHandle];