Skip to content

perf(viewer): cache List summaries instead of storing them in State - #553

Open
omkargaikwad23 wants to merge 1 commit into
mainfrom
perf/list-summaries-cache
Open

perf(viewer): cache List summaries instead of storing them in State#553
omkargaikwad23 wants to merge 1 commit into
mainfrom
perf/list-summaries-cache

Conversation

@omkargaikwad23

Copy link
Copy Markdown
Collaborator

State is serialized to the browser on every interaction, so keeping the
whole parsed trends cache in eval_summaries made every click upload
megabytes. Clicks that touched no data at all — switching to the Dataset
Quality tab — could stall long enough to look like a hang.

Parse into a module-level cache keyed on the trends cache mtime instead.
Click payload drops to ~1.2 KB and repeat parses go from ~122ms to ~0.07ms.

The cached list is shared across requests in a worker, so the sort now
builds a new list rather than sorting in place.


Stack created with GitHub Stacks CLIGive Feedback 💬

Comment thread viewer/main.py Dismissed
State is serialized to the browser on every interaction, so keeping the
whole parsed trends cache in `eval_summaries` made every click upload
megabytes. Clicks that touched no data at all — switching to the Dataset
Quality tab — could stall long enough to look like a hang.

Parse into a module-level cache keyed on the trends cache mtime instead.
Click payload drops to ~1.2 KB and repeat parses go from ~122ms to ~0.07ms.

The cached list is shared across requests in a worker, so the sort now
builds a new list rather than sorting in place.
@omkargaikwad23
omkargaikwad23 force-pushed the perf/list-summaries-cache branch from f20025e to bcfaa58 Compare August 20, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant