Skip to content

Commit 3f1c846

Browse files
fix: 调小 snapshots 的范围
1 parent 0ad6349 commit 3f1c846

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/utils/fileHistory.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ export type FileHistoryState = {
5151
snapshotSequence: number
5252
}
5353

54-
const MAX_SNAPSHOTS = 100
54+
// Disabled: file checkpointing causes unbounded memory growth (100 snapshots × full file backups).
55+
// See heap snapshot analysis — re-enable only after switching to incremental diffs.
56+
const MAX_SNAPSHOTS = 20
5557
export type DiffStats =
5658
| {
5759
filesChanged?: string[]

0 commit comments

Comments
 (0)