septum icon indicating copy to clipboard operation
septum copied to clipboard

[BUG] Help output is printed slowly

Open onox opened this issue 2 years ago • 6 comments

Describe the bug The output printed by help is printed quite slowly.

To Reproduce Steps to reproduce the behavior:

  1. Go to the prompt
  2. Type 'help' and press the enter key
  3. It takes like 1 or 2 seconds to print everything

Expected behavior (if applicable) See the help text getting printed more or less instantly

Desktop (please complete the following information):

  • OS: Arch Linux
  • Version: Built from Source

Additional context Minor issue.

onox avatar Jan 02 '22 18:01 onox

Might be a regression of #35, I think it might be buffering due to not using a back buffer and the current Trendy Terminal newline settings instead of scrolling. Last time IIRC it was related to a long delay due to VT100.Report_Cursor_Position procedure.

pyjarrett avatar Jan 02 '22 19:01 pyjarrett

Using https://github.com/onox/goblin-terminal (it uses VTE like gnome-terminal). But output is printed instant in tmux! :open_mouth:

onox avatar Jan 02 '22 19:01 onox

Yup, if you use strace to check the length of the system calls you might see an issue. htop has an easy way of doing this.

pyjarrett avatar Jan 02 '22 19:01 pyjarrett

For each line printed, I see:

  • read()
  • read() returning E_AGAIN
  • write()
  • 4x poll()
  • write()
  • clock_nanosleep()
  • 2x poll()
  • write()

With weston-terminal the output is printed instantly and I see:

  • epoll_wait()
  • read()
  • write()

onox avatar Jan 02 '22 20:01 onox

Slow in gnome-terminal as well (not a surprise since it uses VTE)

onox avatar Jan 02 '22 20:01 onox

Thanks! I'll look when I can, but it might be a couple of days before I get to this.

pyjarrett avatar Jan 02 '22 20:01 pyjarrett