AltimateAI / AltimateAI/altimate-code

perf: listTracesPaginated loads all traces into memory before slicing

Aperta
#667 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
811
Fork
134
Merge medio
3g 2h
PR unite (30g)
50

Descrizione

Found during v0.5.20 release review. Deferred because: requires embedding timestamps in filenames or a lightweight index — significant design work.

`listTracesPaginated` calls `Trace.listTraces(dir)` which reads and JSON-parses every trace file on disk, then slices the array. For users with thousands of traces, this is O(n) memory and CPU on every paginated request. The pagination API gives users the impression of efficiency while doing full-table-scan work underneath.

Flagged by: CTO, End User, Tech Lead, Chaos Gremlin (4/5 reviewers).

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.