Skip to content

Commit 6a241ea

Browse files
only21milclaude
andauthored
perf(server): sort the working-tree file list once per status read (pingdotgg#22499)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 93d110a commit 6a241ea

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

‎apps/server/src/vcs/GitVcsDriverCore.ts‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,13 +2316,11 @@ export const makeGitVcsDriverCore = Effect.fn("makeGitVcsDriverCore")(function*
23162316

23172317
let insertions = 0;
23182318
let deletions = 0;
2319-
const files = Array.from(fileStatMap.entries())
2320-
.map(([filePath, stat]) => {
2321-
insertions += stat.insertions;
2322-
deletions += stat.deletions;
2323-
return { path: filePath, insertions: stat.insertions, deletions: stat.deletions };
2324-
})
2325-
.toSorted((a, b) => a.path.localeCompare(b.path));
2319+
const files = Array.from(fileStatMap.entries()).map(([filePath, stat]) => {
2320+
insertions += stat.insertions;
2321+
deletions += stat.deletions;
2322+
return { path: filePath, insertions: stat.insertions, deletions: stat.deletions };
2323+
});
23262324

23272325
for (const filePath of changedFilesWithoutNumstat) {
23282326
if (fileStatMap.has(filePath)) continue;

0 commit comments

Comments
 (0)