Skip to content

! resurrect is slower on Windows than on WSL #1

Description

@max-nothacker

Observation

! resurrect works on Windows across all three CLIs (Claude / Codex / Antigravity), but is noticeably slower than on WSL.

Timing (measured — 10 calls each, full path including the clipboard write)

Path ~per call
WSL (bash -> clip.exe via interop) ~105 ms
Windows Git Bash (Claude, direct) ~135-155 ms
Windows cmd/PowerShell -> resurrect.cmd -> bash.exe -> script (Codex/Antigravity) ~160 ms

Likely cause (to confirm further)

Every call spawns clip.exe (a Windows process) to set the clipboard — the dominant cost everywhere (~100 ms even on WSL, which spends almost all of it waiting on the interop spawn: user+sys ~= 0.1 s of 1.05 s for 10 calls).
Windows is slower on top of that because:

  1. MSYS / Git Bash has no native fork() — bash startup + the clip.exe spawn are emulated, costing more CPU than WSL's native Linux fork (Git Bash user+sys ~= 1.1 s vs WSL ~= 0.1 s for 10 calls).
  2. Codex/Antigravity add an extra process hop: cmd/PowerShell -> resurrect.cmd -> bash.exe -> script.

It is process-spawn overhead, not the script logic.

Intended approach

  1. Measure & confirm (done — see table above).
  2. Decide whether to optimize. Candidate fixes (all low value):
    • Drop the extra hop for Codex/Antigravity by making resurrect.cmd a standalone batch (removes the bash.exe spawn) — but duplicates logic (SSoT cost).
    • Background the clipboard write (| clip.exe &) — risky (race: script may exit before clip.exe finishes reading stdin).
    • Accept it: ~150 ms is fine for an interactive helper.

Priority

Low — not important. Filed for tracking.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions