Files
krust/docs
Erfan YousefiandClaude Opus 4.8 45175410fb perf(state): lean entity model — fetch full objects on demand
Stop retaining the full object JSON for every cached entity. At 10k pods in
one context the store held ~482 MB (~48 KB/pod) because ResourceEntity.raw
kept the entire serialized object.

- Replace ResourceEntity.raw with a compact Extracted payload (node name,
  container names, ownerReferences, pod resource req/lim, node capacity),
  computed once at ingest in cluster/extract.rs and dropped.
- Fetch the full object on demand for detail/describe/decode/edit via the new
  ResourceProvider::get_object, cached single-slot (detail_cache).
- Pulse aggregate and log fan-in owner mapping now read extracted fields
  instead of walking raw JSON for every pod.

Also adds a hidden headless benchmark mode (--bench, src/ui/app/bench.rs) that
boots the real data plane against a cluster and times the project/render/pulse
hot paths + RSS, plus the stable-release ROADMAP and the 1.1 design note.

Measured on the kwok 10k-pod lab (1 context, release build):
  RSS              482 MB -> 85.5 MB  (5.6x smaller)
  pulse aggregate  7.62 ms -> 0.36 ms (21x faster)
projection/render unchanged (Phase 2.1); initial sync unchanged — per-event
to_value remains, addressed in Phase 1.2.

Validation: fmt, check, test (71 passed / 3 ignored), release build all green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 11:11:30 +02:00
..