Textualize/textual

Interactive widgets in inline mode appear "laggy" as of 0.56.2

Closed this issue · 5 comments

Using 0.56.2, if you run up this code:

from textual.app import App, ComposeResult
from textual.widgets import Checkbox, Input


class InlineLagApp(App[None]):
    def compose(self) -> ComposeResult:
        yield Checkbox("Toggle this and note nothing happens")
        yield Input(
            placeholder="The above will update if you tab here, this will appear laggy to type into"
        )


if __name__ == "__main__":
    InlineLagApp().run(inline=True)

the application gives the feel of being "laggy". For example, run it up and then:

  • Press space on the Checkbox and notice it doesn't toggle.
  • After a while, tab to the Input and notice the Checkbox finally updates (moving the mouse can have the same effect).
  • Type into the Input and notice that it does refresh, but it's very laggy -- a keystroke takes a significant fraction of a second to appear.

Actually, I think this might be a bit more subtle that reported above. The above was experienced in kitty (0.33.1, macOS). If I try the same in iTerm (3.49.23, macOS) the Checkbox seems to behave/refresh fine, but typing into the Input still has the same laggy feel.

WezTerm (macOS) shows the same behaviour as kitty.

Fixed in 0.56.3

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Awesome, thanks. Looking fine in iTerm, although I'm still seeing some odd laggy behaviour with inputs in kitty (and to some extend in wez too). This feels like a slightly different issue though so I'll dig a bit deeper and raise a fresh issue if I can come up with something reproducible.