perf(usage): skip session scans for empty breakdowns

This commit is contained in:
Orca Worker
2026-09-11 21:52:40 -07:00
parent 20ab995065
commit ee24ad13d1
@@ -111,6 +111,9 @@ export function buildBreakdown(
): CodexUsageBreakdownRow[] {
const rows = new Map<string, CodexUsageBreakdownRow>()
const filteredDaily = getFilteredDaily(state, scope, range)
if (filteredDaily.length === 0) {
return []
}
const filteredSessions = getFilteredSessions(state, scope, range)
for (const daily of filteredDaily) {