v1.3.174
ggcode v1.3.174
Highlights
ggcode report6.6x faster: Parallel file scanning + lightweight JSONL line filtering reduces session analytics from 23s to 3.5s on 2.8GB of data.- Improved diagnostics: Disk write failures for usage/metrics, hooks config, and tunnel start are now logged instead of silently discarded.
Performance
ggcode report Scanner Optimization
Two-stage optimization of the session analytics scanner:
-
fastTypeline filtering (912b56f0): Before full JSON unmarshal, scan the first 100 characters of each line to extract the"type"field. Onlymeta,usage,metric, andmessagetypes need processing — the other ~90% of lines (reasoning, tool_result, tool_use, text, tunnel_event) are skipped with a lightweight string scan. -
Parallel file scanning (
07842e12): Each JSONL file is scanned in a separate goroutine instead of sequentially. Files are fully independent (no shared state), making this embarrassingly parallel.
Benchmark on 68 sessions (2.8GB JSONL, 4.2M lines):
| Stage | Duration | Speedup |
|---|---|---|
| Original | 23.1s | — |
| + fastType | 9.7s | 2.4x |
| + parallel scan | 3.5s | 6.6x |
Throughput: 811 MB/s read+scan rate (approaching NVMe hardware limit).
Fixes
Disk Write Error Logging
Three error paths that previously discarded errors with _ = are now logged via debug.Log:
-
Usage/metric persistence (
346d0300):AppendUsageEntryandAppendMetricerrors inrecordSessionUsage/recordSessionMetricwere silently discarded. If the disk write fails (disk full, permissions), token usage and metric data were silently lost with no diagnostic. The adjacentAppendMetaToDiskcall already logged its errors — these two were an oversight. -
Hooks config save (
bb9b0c30):saveHooksConfigdiscarded theconfig.Save()error. If the disk write fails, hooks config silently reverts on restart with no diagnostic. -
Tunnel start failure (
af496e05): Tunnel start errors were only shown in the chat UI (ephemeral) with nodebug.Log. When users report tunnel connection issues, developers had no way to see the failure reason from debug logs. Addeddebug.Logwith generation number for correlation.
Upgrade Notes
No breaking changes. All improvements are backward compatible.