aboutsummaryrefslogtreecommitdiffstats
path: root/config/viewer.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-07-10 14:42:17 +0200
committerRobin Jarry <robin@jarry.cc>2023-07-10 15:16:54 +0200
commitab3debc1fad99e7a10a530055eed185eb370be79 (patch)
treeb0ea6823269718baa0d984158223b4ddd7713bc8 /config/viewer.go
parent53de61a1ca012b4b63f882a9a55c1cfcc204c5e4 (diff)
downloadaerc-ab3debc1fad99e7a10a530055eed185eb370be79.tar.gz
viewer: avoid high cpu usage when selecting part with no filter
When selecting a message part that has no filter configured, aerc uses very high CPU. This is due to a recursive UI invalidation. PartViewer.Draw() calls newNoFilterConfigured which calls ui.Grid.AddChild which in turn calls ui.Invalidate() which causes the whole UI to be redrawn. Call newNoFilterConfigured only once when creating a new part viewer (only when there is no filter command). Reported-by: Willow Barraco <contact@willowbarraco.fr> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Willow Barraco <contact@willowbarraco.fr>
Diffstat (limited to 'config/viewer.go')
0 files changed, 0 insertions, 0 deletions