Skip to content
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

The shell integration is slow in WSL #3562

Closed
Frojdholm opened this issue Apr 19, 2023 · 4 comments
Closed

The shell integration is slow in WSL #3562

Frojdholm opened this issue Apr 19, 2023 · 4 comments
Labels
bug Something isn't working waiting-on-op Waiting for more information from the original poster

Comments

@Frojdholm
Copy link

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20230408-112425-69ae8472

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

Sourcing the shell integration in WSL on windows causes noticeable slow-downs when redrawing PS1.

I didn't test the latest nightly since no change since the latest release seemed related to the shell integration. Seems related to #3402.

To Reproduce

  1. Run wezterm on windows in the WSL domain (Ubuntu 22.04).
  2. Source the shell integration (wezterm.sh).

There's a noticeable delay when redrawing the prompt.

Configuration

no config

Expected Behavior

The prompt shouldn't be noticeably slower.

Logs

No response

Anything else?

No response

@Frojdholm Frojdholm added the bug Something isn't working label Apr 19, 2023
@wez
Copy link
Owner

wez commented Apr 19, 2023

If you use wezterm ssh to ssh into the WSL instance, do you still observe the slowdown?
Using wezterm ssh bypasses conpty.
conpty has some issues with the family of escape sequences used in shell integration:

@wez wez added the waiting-on-op Waiting for more information from the original poster label Apr 19, 2023
@Frojdholm
Copy link
Author

I didn't have an SSH server setup in WSL and I don't have the time right now to figure out how to set it up, sorry.

Since I mostly wanted new tabs to open in the same directory as the focused tab I got around this by creating a bash function that prints the escape sequence whenever I cd.

function cd() {
    builtin cd "$@"
    printf "\033]7;file://%s%s\033\\" "${HOSTNAME}" "${PWD}"
}

This works okay for me for now (no delay), with the drawback that you have to cd at least once for it to trigger.

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label Apr 21, 2023
@wez wez added the waiting-on-op Waiting for more information from the original poster label Apr 21, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@github-actions github-actions bot closed this as completed May 5, 2023
wez added a commit that referenced this issue May 21, 2023
I want to try out the FTCS flush and any other conpty fixes that may
have been made since our last update.

refs: microsoft/terminal#13710

These other issues may experience improved results, but likely not:

refs: #3748
refs: #3624
refs: #2779
refs: #2902
refs: #3531
refs: #3562
@github-actions
Copy link
Contributor

github-actions bot commented Jun 5, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working waiting-on-op Waiting for more information from the original poster
Projects
None yet
Development

No branches or pull requests

2 participants