Merge pull request #1046 from ichizok/fix/latency

Reduce processing-queue latency
This commit is contained in:
ichizok
2020-05-26 19:28:44 +09:00
committed by GitHub
6 changed files with 21 additions and 5 deletions
+2 -2
View File
@@ -633,6 +633,7 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true)
== kCFRunLoopRunHandledSource)
; // do nothing
[self processInputQueue];
}
- (void)flushQueue:(BOOL)force
@@ -729,8 +730,7 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
// The above calls may have placed messages on the input queue so process
// it now. This call may enter a blocking loop.
if ([inputQueue count] > 0)
[self processInputQueue];
[self processInputQueue];
return inputReceived;
}
+8 -1
View File
@@ -347,12 +347,19 @@ gui_mch_update(void)
CFAbsoluteTime nowTime = CFAbsoluteTimeGetCurrent();
if (nowTime - lastTime > 1.0 / 30) {
[[MMBackend sharedInstance] update];
gui_macvim_update();
lastTime = nowTime;
}
}
void
gui_macvim_update(void)
{
[[MMBackend sharedInstance] update];
}
/* Flush any output to the screen */
void
gui_mch_flush(void)
+2
View File
@@ -17,6 +17,8 @@ gui_mch_open(void);
void
gui_mch_update(void);
void
gui_macvim_update(void);
void
gui_mch_flush(void);
void
gui_macvim_flush(void);
+1 -1
View File
@@ -432,7 +432,7 @@ for g:testfunc in sort(s:tests)
" tests pending for now before a more proper fix is implemented.
call extend(s:messages, [
\ 'Flaky test failed too often, giving up',
\ 'MacVim marked ' . s:test . ' as pending',
\ 'MacVim marked ' . g:testfunc . ' as pending',
\ ])
let v:errors = []
endif
+1 -1
View File
@@ -609,7 +609,7 @@ func Nb_basic(port)
" detach
call appendbufline(cmdbufnr, '$', 'detach_Test')
call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 6)')
call WaitFor('len(readfile("Xnetbeans")) >= (g:last + 8)')
let l = readfile('Xnetbeans')
call assert_equal('0:disconnect=91', l[-1])
+7
View File
@@ -707,7 +707,14 @@ ui_breakcheck_force(int force)
#ifdef FEAT_GUI
if (gui.in_use)
{
# ifdef FEAT_GUI_MACVIM
if (force)
gui_macvim_update();
else
# endif
gui_mch_update();
}
else
#endif
mch_breakcheck(force);