fix: speed up panel startup pod probes
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"version": 1,
|
||||
"relations": [
|
||||
{
|
||||
"ticket_id": "00001KVF0ZJM5",
|
||||
"kind": "related",
|
||||
"target": "00001KVDETSN6",
|
||||
"note": "Implements live startup latency improvement after dashboard content-ready measurement exposed Pod probe bottleneck.",
|
||||
"author": "yoi ticket",
|
||||
"at": "2026-06-19T04:19:09Z"
|
||||
},
|
||||
{
|
||||
"ticket_id": "00001KVF0ZJM5",
|
||||
"kind": "related",
|
||||
"target": "00001KVDQH839",
|
||||
"note": "Uses shell/live startup measurements added by the E2E launch-path work.",
|
||||
"author": "yoi ticket",
|
||||
"at": "2026-06-19T04:19:09Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
title: 'Panel startup で Pod status probe を重複実行せず初回一覧表示を高速化する'
|
||||
state: 'closed'
|
||||
created_at: '2026-06-19T04:07:17Z'
|
||||
updated_at: '2026-06-19T04:19:09Z'
|
||||
assignee: null
|
||||
readiness: 'implementation_ready'
|
||||
risk_flags: ['panel', 'startup-latency', 'pod-status-probe', 'live-path', 'performance']
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
Live workspace で `yoi panel` を起動すると、first frame は約 50ms で出る一方、実際の Ticket / Pod rows が表示されるまで約 8 秒かかっている。実測 breakdown では `pod_metadata_status_probe.initial`、`companion.presence`、`orchestrator.presence` がそれぞれ約 2.5 秒かかり、同じ Pod metadata / live status scan が初回 dashboard render 前に直列で重複実行されている。
|
||||
|
||||
この Ticket では初回一覧表示前の重複 Pod status probe をなくし、live Pod summary の重い session log scan を避け、ユーザー目線の「一覧が表示されるまで」を短縮する。
|
||||
|
||||
## Requirements
|
||||
|
||||
- `load_multi_pod_snapshot` で初回 `load_pod_list` の結果を Companion / Orchestrator presence 判定に再利用する。
|
||||
- 初回 render 前に `load_exact_companion_pod_presence` / `load_exact_pod_presence` 相当の追加 full probe を直列実行しない。
|
||||
- Live status probe は session log 全読みの preview/summary 作成を初回 path で行わない。
|
||||
- stored metadata summary を優先して使う。
|
||||
- live-only row は minimal live summary でよい。
|
||||
- Companion / Orchestrator spawn/restore が必要な場合の reload は維持する。
|
||||
- Existing Panel behavior を壊さない。
|
||||
- Companion / Orchestrator live status 表示
|
||||
- Queue action
|
||||
- Pod rows open/attach
|
||||
- E2E dashboard readiness
|
||||
- Live workspace に近い例外的計測で、rows 表示までの時間が改善していることを確認する。
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- Panel startup source breakdown で `companion.presence` / `orchestrator.presence` が追加 full Pod probe として秒単位で出ない。
|
||||
- Live workspace 計測で first non-empty rows 表示が従来約 8 秒から明確に短縮する。
|
||||
- `cargo test -p yoi-e2e --features e2e --test panel` が通る。
|
||||
- `cargo check -p yoi-e2e -p yoi -p tui --features tui/e2e-test` が通る。
|
||||
- `cargo fmt --check` / `git diff --check` / `target/debug/yoi ticket doctor` が通る。
|
||||
|
||||
## Related work
|
||||
|
||||
- `00001KVDETSN6` — Panel startup latency をユーザー目線の dashboard content ready 基準で計測・改善する。
|
||||
- `00001KVDQH839` — Panel E2E に shell Enter 起動経路の dashboard readiness 計測を追加する。
|
||||
@@ -0,0 +1,22 @@
|
||||
Implemented and validated.
|
||||
|
||||
Changes:
|
||||
- Reused the initial `load_pod_list` result for Companion and Orchestrator presence in `load_multi_pod_snapshot`, removing two duplicate full Pod status probes before the first dashboard rows render.
|
||||
- Renamed the E2E source timings to `companion.presence.from_initial_list` and `orchestrator.presence.from_initial_list` so regressions show whether the initial list is reused.
|
||||
- Changed Pod list startup summarization to avoid reading active session logs while building initial Pod rows. Stored metadata now uses a cheap active-segment marker and live-only rows keep existing minimal live/pending summaries.
|
||||
- Preserved spawn/restore behavior after Companion/Orchestrator lifecycle changes; if lifecycle changes require reload, the existing reload path remains.
|
||||
|
||||
Live-path measurement in the current workspace:
|
||||
- Before this fix: first non-empty Panel rows appeared at about 7967ms; `pod_metadata_status_probe.initial`, `companion.presence`, and `orchestrator.presence` were each about 2.5s.
|
||||
- After removing duplicate probes only: first non-empty rows appeared at about 2964ms; duplicate presence probes dropped to 0ms but initial Pod metadata/status probe was still about 2386ms.
|
||||
- After also removing session-log reads from the startup Pod summary path: first non-empty rows appeared at about 754ms; `pod_metadata_status_probe.initial` was about 138ms; total dashboard source breakdown was about 649ms.
|
||||
|
||||
Validation:
|
||||
- cargo test -p tui pod_list --lib
|
||||
- cargo test -p yoi-e2e --features e2e --test panel
|
||||
- cargo check -p yoi-e2e -p yoi -p tui --features tui/e2e-test
|
||||
- cargo build -p yoi
|
||||
- cargo fmt --check
|
||||
- git diff --check
|
||||
- target/debug/yoi ticket doctor
|
||||
- nix build .#yoi --no-link
|
||||
@@ -0,0 +1,46 @@
|
||||
<!-- event: create author: "yoi ticket" at: 2026-06-19T04:07:17Z -->
|
||||
|
||||
## 作成
|
||||
|
||||
LocalTicketBackend によって作成されました。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: hare at: 2026-06-19T04:19:09Z from: inprogress to: closed reason: closed field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Ticket を closed にしました。
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: close author: hare at: 2026-06-19T04:19:09Z status: closed -->
|
||||
|
||||
## 完了
|
||||
|
||||
Implemented and validated.
|
||||
|
||||
Changes:
|
||||
- Reused the initial `load_pod_list` result for Companion and Orchestrator presence in `load_multi_pod_snapshot`, removing two duplicate full Pod status probes before the first dashboard rows render.
|
||||
- Renamed the E2E source timings to `companion.presence.from_initial_list` and `orchestrator.presence.from_initial_list` so regressions show whether the initial list is reused.
|
||||
- Changed Pod list startup summarization to avoid reading active session logs while building initial Pod rows. Stored metadata now uses a cheap active-segment marker and live-only rows keep existing minimal live/pending summaries.
|
||||
- Preserved spawn/restore behavior after Companion/Orchestrator lifecycle changes; if lifecycle changes require reload, the existing reload path remains.
|
||||
|
||||
Live-path measurement in the current workspace:
|
||||
- Before this fix: first non-empty Panel rows appeared at about 7967ms; `pod_metadata_status_probe.initial`, `companion.presence`, and `orchestrator.presence` were each about 2.5s.
|
||||
- After removing duplicate probes only: first non-empty rows appeared at about 2964ms; duplicate presence probes dropped to 0ms but initial Pod metadata/status probe was still about 2386ms.
|
||||
- After also removing session-log reads from the startup Pod summary path: first non-empty rows appeared at about 754ms; `pod_metadata_status_probe.initial` was about 138ms; total dashboard source breakdown was about 649ms.
|
||||
|
||||
Validation:
|
||||
- cargo test -p tui pod_list --lib
|
||||
- cargo test -p yoi-e2e --features e2e --test panel
|
||||
- cargo check -p yoi-e2e -p yoi -p tui --features tui/e2e-test
|
||||
- cargo build -p yoi
|
||||
- cargo fmt --check
|
||||
- git diff --check
|
||||
- target/debug/yoi ticket doctor
|
||||
- nix build .#yoi --no-link
|
||||
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user