From 145b7be0a16299c70084c96b3123681fe4e05461 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 28 Feb 2016 11:03:40 +0200 Subject: [PATCH] Fixed particular slowdown in OS X startup window During loading of .pk3 that stores hundred of .wad's significant amount of time were spent on scrolling text to the last line The same applies to other cases like output of thousands warnings/errors --- src/posix/cocoa/st_console.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/posix/cocoa/st_console.mm b/src/posix/cocoa/st_console.mm index d33a3e361..09d0c9421 100644 --- a/src/posix/cocoa/st_console.mm +++ b/src/posix/cocoa/st_console.mm @@ -313,9 +313,10 @@ void FConsoleWindow::AddText(const char* message) if ([m_window isVisible]) { - [m_textView scrollRangeToVisible:NSMakeRange(m_characterCount, 0)]; - - [[NSRunLoop currentRunLoop] limitDateForMode:NSDefaultRunLoopMode]; + UpdateTimed([&]() + { + [m_textView scrollRangeToVisible:NSMakeRange(m_characterCount, 0)]; + }); } }