Skip to content

remove slow filesystem operations for WSL sessions#10240

Open
acarl005 wants to merge 1 commit intomasterfrom
andy/wsl-tab-switch-freeze
Open

remove slow filesystem operations for WSL sessions#10240
acarl005 wants to merge 1 commit intomasterfrom
andy/wsl-tab-switch-freeze

Conversation

@acarl005
Copy link
Copy Markdown
Contributor

@acarl005 acarl005 commented May 6, 2026

Description

9920

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Screenshots / Videos

Testing

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label May 6, 2026
@acarl005 acarl005 marked this pull request as ready for review May 6, 2026 05:55
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 6, 2026

@acarl005

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR avoids slow filesystem probes for WSL sessions by moving the active-session directory existence check into the shell-launch-data branch and by avoiding read_link for non-drive WSL paths.

Concerns

  • WSL sessions whose cwd is under /mnt/<drive>/... now skip is_dir() even though those paths convert to native Windows drive paths, so deleted directories can be treated as valid startup directories.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/terminal/view.rs
// Use Path::is_dir() to validate the path is still valid,
// e.g. hasn't been deleted, but skip this check in WSL
// because the WSL filesystem bridge is too slow.
ShellLaunchData::WSL { .. } => true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] This skips the existence check for every WSL cwd, including /mnt/<drive>/... paths that convert to native Windows drives instead of the slow \\WSL$ bridge; keep validating those native paths so deleted directories are not returned as valid startup directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant