Duplicating tab is *significantly* slower than new tab #22671

Open
opened 2026-01-31 08:20:09 +00:00 by claunia · 0 comments
Owner

Originally created by @jaybosamiya-ms on GitHub (Dec 16, 2024).

Windows Terminal version

1.21.3231.0

Windows build number

10.0.26100.0

Other Software

zsh 5.9 (x86_64-ubuntu-linux-gnu)

Steps to reproduce

  1. Set default profile to Ubuntu (might not be necessary, but I have only tested this on Ubuntu, with zsh as my shell)
  2. Make sure that the PWD tracking is set up
    if test -n "$WT_SESSION"; then
        # See https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory
        __keep_current_path() { printf "\e]9;9;%s\e\\" "$(wslpath -w "$PWD")" }
        precmd_functions+=(__keep_current_path)
    fi
    
  3. Open new tab---this is always practically instant
  4. Duplicate the tab---this sometimes takes 30s to even a minute; most of the times, this is roughly as fast as opening a new tab, but other times, it takes a long time (obviously, this is not WSL spin-up time, because WSL it already running, and even opening a new tab works immediately). No clear pattern to when it is going take longer to duplicate a tab though.

Expected Behavior

Duplicating a tab should not be faster than opening a new tab and running cd {prev tab working directory}

Actual Behavior

Duplicating the tab (sometimes) literally takes longer than me re-typing the whole path out by hand.

Originally created by @jaybosamiya-ms on GitHub (Dec 16, 2024). ### Windows Terminal version 1.21.3231.0 ### Windows build number 10.0.26100.0 ### Other Software zsh 5.9 (x86_64-ubuntu-linux-gnu) ### Steps to reproduce 1. Set default profile to Ubuntu (might not be necessary, but I have only tested this on Ubuntu, with zsh as my shell) 2. Make sure that the PWD tracking is set up ```zsh if test -n "$WT_SESSION"; then # See https://learn.microsoft.com/en-us/windows/terminal/tutorials/new-tab-same-directory __keep_current_path() { printf "\e]9;9;%s\e\\" "$(wslpath -w "$PWD")" } precmd_functions+=(__keep_current_path) fi ``` 4. Open new tab---this is always _practically_ instant 5. Duplicate the tab---this _sometimes_ takes 30s to even a minute; most of the times, this is roughly as fast as opening a new tab, but other times, it takes a _long_ time (obviously, this is not WSL spin-up time, because WSL it _already_ running, and even opening a new tab works immediately). No clear pattern to _when_ it is going take longer to duplicate a tab though. ### Expected Behavior Duplicating a tab should not be faster than opening a new tab and running `cd {prev tab working directory}` ### Actual Behavior Duplicating the tab (sometimes) literally takes longer than me re-typing the whole path out by hand.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22671