From 5c32989f53310f52dc93c428561424eaa0f15c17 Mon Sep 17 00:00:00 2001 From: hyf0-agent Date: Thu, 12 Feb 2026 16:10:21 +0800 Subject: [PATCH] perf: use JSON.parse instead of JSON5.parse for sessions.json (~35x faster) (#14530) Co-authored-by: hyf0-agent --- src/config/sessions/store.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/config/sessions/store.ts b/src/config/sessions/store.ts index 5aea98d4ed7..c8f790b759e 100644 --- a/src/config/sessions/store.ts +++ b/src/config/sessions/store.ts @@ -1,4 +1,3 @@ -import JSON5 from "json5"; import crypto from "node:crypto"; import fs from "node:fs"; import path from "node:path"; @@ -144,7 +143,7 @@ export function loadSessionStore( let mtimeMs = getFileMtimeMs(storePath); try { const raw = fs.readFileSync(storePath, "utf-8"); - const parsed = JSON5.parse(raw); + const parsed = JSON.parse(raw); if (isSessionStoreRecord(parsed)) { store = parsed; }