-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiencing delays in some terminals after closing Textual app #1920
Comments
This ties in quite nicely with some oddness I noticed with kitty on macOS while I was iterating over the checkbox and radio button code last week. @willmcgugan may recall that we were comparing how things looked in iTerm vs kitty and I kept complaining that there was an odd delay when I exited the test app in kitty; at the time I dismissed it as a likely clash between my Now that @mrossinek has seen a similar thing I'm reminded of that. Curiously, exiting any Textual app in kitty is slow (vs iTerm), but exiting Midnight Commander (picking another full terminal app) is fine. |
As a further data point: if I run one of my own apps installed via |
I did a git bisection and this seems to be the first bad commit: 4d1a3a5 |
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Delivering on a promise made in Textualize#1920.
Interesting. I don't see that on iTerm, but I do in Kitty. Commenting out the begin_update doesn't appear to make any difference. More investigation needed. @mrossinek thanks for looking in to this. |
Found the culprit! I think I might do a point release for this. |
Nice! What was it in the end? |
Yesterday evening I was discussing this with @davep over on Discord, too. iTerm seemed to be fine on MacOS then, too, but Kitty was not. I recall we tested some more terminal then as well but cannot access right now to share here.. |
Don't forget to star the repository! Follow @textualizeio for Textual updates. |
I mixed up begin_update with begin_batch. The former writes an escape sequence that says "don't display anything until end_update". It should have been So the terminal was stuck waiting for the end_batch. Not sure why iTerm treats this differently to Kitty and others. |
D'oh! Good catch! I didn't even register that when I looked at the commit! |
In some terminals closing any textual app has a certain delay. I can reproduce this with any of the provided examples.
The oddest aspect is, that the delays differ between terminals. Below some estimated closing times (i.e. the delay between hitting the quit keybind (triggers the screen clearing immediately) and the time until the next prompt renders). These are on Arch Linux
6.1.11-arch1-1
:0.11.0 (8dbaa0bb)
: instant0.27.1
: approx 2 seconds20221119-145034-49b9839f
: I have not seen the next prompt appear at all... (this is how I noticed in the first place 😅)Wezterm
Kitty
Alacritty
Nothing much to see here to be honest 🤔
The text was updated successfully, but these errors were encountered: