AltimateAI / AltimateAI/altimate-code

perf: listTracesPaginated loads all traces into memory before slicing

Open
#667 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
811
Forks
134
Avg merge
3d 2h
Merged PRs (30d)
50

Description

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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.