Skip to content

Commit aaae064

Browse files
connorjclarkSiegeLord
authored andcommitted
[OSX] Do not wait for main thread when appending to native text log
I tracked down a huge FPS drop in my application to this line. The application was doing tons of logging to a native text log, and each one (on OSX) waits for the main thread to ack the message. The FPS difference was something like 1000 -> 30. I don't see a reason to wait for this message to be ack'd, and things still seem to function just the same. I did not confirm if other platforms have the same problem.
1 parent cb7675f commit aaae064

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

addons/native_dialog/osx_dialog.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ void _al_append_native_text_log(ALLEGRO_NATIVE_DIALOG *textlog)
352352
NSString *text = [NSString stringWithUTF8String: al_cstr(textlog->tl_pending_text)];
353353
[view performSelectorOnMainThread:@selector(appendText:)
354354
withObject:text
355-
waitUntilDone:YES];
355+
waitUntilDone:NO];
356356

357357
al_ustr_truncate(textlog->tl_pending_text, 0);
358358
}

0 commit comments

Comments
 (0)