From c947811e9f7a3421212287cbe9fce125aa059467 Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 12 Sep 2022 16:09:19 -0500 Subject: ui: process tcell events in a separate go routine from rendering The UI runs off a 16 ms ticker. If no render is required, and no event is seen, aerc waits 16 ms before checking for new events or render requests. This severely limits handling of events from tcell, and is particularly noticeable on pasting of large quantities of text. Process tcell events in a separate go routine from the render loop. Signed-off-by: Tim Culverhouse Acked-by: Moritz Poldrack Acked-by: Robin Jarry --- aerc.go | 1 + 1 file changed, 1 insertion(+) (limited to 'aerc.go') diff --git a/aerc.go b/aerc.go index 203a232a..37d9509f 100644 --- a/aerc.go +++ b/aerc.go @@ -241,6 +241,7 @@ func main() { setWindowTitle() } + go ui.Run() for !ui.ShouldExit() { for aerc.Tick() { // Continue updating our internal state -- cgit