| ... | ... | @@ -379,10 +379,18 @@ const installWindowsEnvironment = Effect.fn("desktop.shellEnvironment.installWin |
| 379 | 379 | function* ( |
| 380 | 380 | config: ShellEnvironmentConfig, |
| 381 | 381 | ): Effect.fn.Return<void, never, ChildProcessSpawner.ChildProcessSpawner> { |
| 382 | | const noProfile = yield* readWindowsEnvironment(["PATH"], { loadProfile: false }); |
| 383 | | const profile = yield* readWindowsEnvironment(WINDOWS_PROFILE_ENV_NAMES, { |
| 384 | | loadProfile: true, |
| 385 | | }); |
| 382 | // Concurrent, not sequential: these two probes are independent (only their |
| 383 | // results are combined below) and each spawns its own PowerShell. Run in |
| 384 | // series they sit at offset 0 of desktop.startup, before anything else, and |
| 385 | // launch traces measured them at 2718ms then 2066ms — the entire 4.8s |
| 386 | // startup span, of which desktop.bootstrap is ~30ms. |
| 387 | const [noProfile, profile] = yield* Effect.all( |
| 388 | [ |
| 389 | readWindowsEnvironment(["PATH"], { loadProfile: false }), |
| 390 | readWindowsEnvironment(WINDOWS_PROFILE_ENV_NAMES, { loadProfile: true }), |
| 391 | ], |
| 392 | { concurrency: 2 }, |
| 393 | ); |
| 386 | 394 | const mergedPath = mergePaths("win32", [ |
| 387 | 395 | trimNonEmpty(profile.PATH), |
| 388 | 396 | trimNonEmpty(knownWindowsCliDirs(config.env).join(";")), |