Skip to content

perf: stop refetching the account overview on view switches and in Findings - #96

Merged
Bccorb merged 2 commits into
mainfrom
perf/view-latency
Oct 15, 2026
Merged

Bccorb merged 2 commits into
mainfrom
perf/view-latency

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Startup and view switching waited on far more AWS calls than the screen being shown needed. This removes the redundant work.

  • View switches reuse a fresh account overview. Navigation used to refetch the whole overview (about ten services) before the view's own data, every time the 60s inventory cache had expired. A manual refresh (r) and profile or region switches still always refetch it.
  • The overview loads alongside the view, not ahead of it. When it is needed, it runs on its own task; Done waits for it because findings gate on the overview.
  • Findings no longer fetches every service twice. It builds the overview from the inventories it already loads, fetching only the caller identity and ECS on top. ECS lands in the cache as a side effect.
  • The header stays populated during a refresh. The overview is only cleared on a profile or region change.
  • Startup no longer waits on Cost Explorer. Cost data is read from the on-disk cache only; the cost views already force a live fetch when entered.
  • The overview's Lambda count skips per-function ListTags calls it never used.

Notes

  • When Findings supplies the overview, the SQS queue count only includes queues whose attributes loaded, so a queue whose attribute call fails is missing from the header count.
  • Cost Savings still fetches EC2, API Gateway, Lambda, and Target Groups for both itself and the overview, now concurrently. It covers about half of what the overview needs, so deriving the overview there needs a more general refactor.
  • Startup still waits on region discovery before the first frame.

Validation

  • cargo fmt --all --check
  • cargo test --all (227 passed), including new tests for the refresh behavior and the overview summary builders
  • cargo clippy --all-targets -- -D warnings
  • Not yet timed against a live account

@Bccorb
Bccorb merged commit 54ae0fd into main Oct 15, 2026
3 checks passed
@Bccorb
Bccorb deleted the perf/view-latency branch November 8, 2026 00:06
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