Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Every git read on Windows starts a hidden conhost.exe #28901

ClosedAkiVonAkira(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. On Windows with Git for Windows installed, open a project in the desktop app.
  2. Watch process starts while the app is idle, for example with Process Monitor filtered to process create events, or a job object around the server.

Expected behavior

A git read such as git rev-parse --git-path index or git config --get <key> starts one process, git.exe.

Actual behavior

Every git command the server starts also starts a hidden conhost.exe. The desktop server is a GUI-subsystem process, so it has no console. Effect's spawner passes windowsHide: true, libuv turns that into CREATE_NO_WINDOW, and Windows then creates a new console host for each console program it starts.

On my machine each console host adds about 11 ms to git's startup. A remote status refresh runs 10 processes instead of 5 and takes about 127 ms instead of 64 ms at the median. Over 2 minutes with a project open and idle, a dev server started 126 processes, of which 73 were conhost.exe.

Git for Windows runs fine without a console. When it has none, it starts its own children with DETACHED_PROCESS (compat/mingw.c). So the server could start git's plain ref and config reads the same way.

This is the remaining part of #12498. When that issue was closed, the reply said idle process starts were still above target and asked for a new issue for that part.

Impact

Minor bug or occasional failure

Version or commit

main @ 01a93e7b51

Environment

Windows 11 Pro 23H2, Git for Windows 2.54.0 (mingw64) and MinGit 2.56.0.2 (ucrt64), T3 Code desktop (Electron's Node 24)

  1. maria-rcks closed this

Sign in to join this conversation.