Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(windows): reduce startup command discovery and Git probe overhead #6124

Closedsimon-curtis(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/6124/headopened View on GitHub

Showing 13 changed files with 83 additions and 5 deletions (loading 9).

x
0 of 13 viewed, 13 left
18 additions and 0 deletionsapps/server/src/process/externalLauncher.test.tsModified
View file
@@ -11,6 +11,7 @@
import * as FileSystem from "effect/FileSystem";
import * as Layer from "effect/Layer";
import * as Path from "effect/Path";
+import * as PlatformError from "effect/PlatformError";
import * as Sink from "effect/Sink";
import * as Stream from "effect/Stream";
import * as TestClock from "effect/testing/TestClock";
@@ -835,11 +836,17 @@
​
it.effect("memoizes editor discovery and refreshes after the cache window", () => {
let statCalls = 0;
+ let directoryCalls = 0;
const fileInfo = { type: "File" } as FileSystem.File.Info;
const launcherLayer = ExternalLauncher.layer.pipe(
Layer.provide(
Layer.mergeAll(
FileSystem.layerNoop({
+ readDirectory: () =>
+ Effect.sync(() => {
+ directoryCalls += 1;
+ return ["code.eXe", "cursor.EXE"];
+ }),
stat: () =>
Effect.sync(() => {
statCalls += 1;
@@ -860,6 +867,7 @@
​