~broomhall


#400 Editing the subject in the composer causes the contents of the whole tab to redraw 4 months ago

Ticket created by ~broomhall on ~sircmpwn/aerc2

I think commands/account/compose.go calls tab.content.Invalidate() every time you type a character in the subject header. That causes the whole tab to be redrawn rather than just the tab strip. On a very slow machine, this takes a long time and there is a noticeable lag - ~750ms per character on a RaspberryPi 1 - giving a poor experience. Commenting out the Invalidate() line doesn't seem to break anything (tab strip and subject line update OK), although I've not tested it thoroughly. Is that line needed?

Incidentally, the reason it take so long to refresh the screen seems to be that it invalidates the whole of the editor area. This necessitates many calls to term.styleFromCell(cell) from /widgets/terminal.go which takes majority of the time. But that's probably a performance bug for go-libvterm.