You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 570eab5
Browse filesBrowse the repository at this point in the historyBrowse files
perf(sessions): stop per-row full-store scans in ACP meta reads (#114237)
* perf(sessions): stop per-row full-store scans in ACP meta reads
Every per-session ACP meta read listed and JSON-parsed the entire session
store just to find one row, making gateway sessions.list O(rows^2). A CPU
profile on team.openclaw.ai showed 12.7s of a 78.5s window inside
parseSqliteSessionEntryJson via buildGatewaySessionRow -> readAcpSessionMeta.
Resolve the store key with exact read-only single-row probes (exact key,
then lowercased key) and keep the full scan only as the fallback for legacy
case-variant keys. Adds the missing read-only exact-probe accessor next to
loadExactSessionEntry.
* refactor(acp): split session store binding out of session-meta
max-lines pushed session-meta.ts past 700; the store-binding helpers
(resolveStoreEntryForSessionKey, resolveSessionStorePathForAcp,
readSessionEntryFromStore) are one cohesive unit and move to
session-meta-store.ts. Re-export keeps the public entrypoint stable.
* perf(sessions): case-variant fallback scans keys, not parsed entries
Review caught that a per-row miss still parsed the full store. The fallback
only needs persisted keys to find a legacy case-variant, so list keys without
touching entry_json and probe the single winner.
0 commit comments