Skip to content

reduce the \e[6n spam to improve high-ping ssh scenarios #968

@Jan9103

Description

@Jan9103

currently reedline sends a \e[6n to the terminal after every redraw (pressing any key).
this causes reedline to block until it gets the cursor-position back from the terminal.

lets say you have a 500ms ping (Geo-stationary satellite internet, cross-continent, etc):

  1. you send a single keypress lets say a
  2. 500ms: pass and it arrives at the server
  3. 1sec: reedline requests the cursor position (\e[6n)
    1. 500ms your terminal receives the request
    2. 500ms reedline recieves the response
  4. 500ms: reedline sends the updates to your terminal

so it takes 2 seconds to render 1 character change.. and half of it is caused by the cursor-position-request.

i found this by running nu via ^nu | ^tee test.bin and checking test.bin after every key-press in a separate terminal.

References

discussions about reedline being slow over ssh:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions