aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/spinner.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-04-02 22:57:13 +0200
committerRobin Jarry <robin@jarry.cc>2023-04-04 00:20:24 +0200
commit382aea4a942600935a5c2d0e4d42cbe129e9be9a (patch)
tree3bbe3d5cb3e2c086f208753c2ea3d02515d599f4 /widgets/spinner.go
parent63019343660049eadb2273a7ea0e13a2a0580b51 (diff)
downloadaerc-382aea4a942600935a5c2d0e4d42cbe129e9be9a.tar.gz
terminal: avoid high cpu usage when not focused
When running dynamic tui applications (such as btop, htop, etc.) in the embedded :terminal and focusing an account tab, every tui application change triggers a full redraw of the whole window. When the message list is focused, this leads to high cpu usage because of the computationally intensive templates parsing and ansi sequence handling. Only redraw when the terminal is focused. Do not use tcell Watch and Unwatch functions since these completely disable all widget updates, including title changes and terminal close events. Reported-by: John Mcenroy <handplanet@outlook.com> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: John Mcenroy <handplanet@outlook.com>
Diffstat (limited to 'widgets/spinner.go')
0 files changed, 0 insertions, 0 deletions