Repository navigation
Commit 32c27ca
committed
perf(ccusage): reduce native JSONL parse work
Avoid parsing JSON for transcript lines that cannot contain usage tokens in the native loader. The file-order timestamp prepass now extracts compact JSONL timestamps directly and falls back to the existing serde_json path when that fast path does not apply.
This keeps daily, session, monthly, and blocks JSON output identical while cutting the local offline daily benchmark from roughly 1.25s median to roughly 0.65s median.
Refs #9771 parent 61e12b8 commit 32c27ca
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
686 | 689 | | |
687 | 690 | | |
688 | 691 | | |
| |||
982 | 985 | | |
983 | 986 | | |
984 | 987 | | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
985 | 991 | | |
986 | 992 | | |
987 | 993 | | |
| |||
991 | 997 | | |
992 | 998 | | |
993 | 999 | | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
994 | 1008 | | |
995 | 1009 | | |
996 | 1010 | | |
| |||
2006 | 2020 | | |
2007 | 2021 | | |
2008 | 2022 | | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
2009 | 2033 | | |
0 commit comments