Přeskočit na obsah

Tato stránka byla automaticky přeložena z angličtiny, jediného jazyka, ve kterém se tento web píše. Číst originál.

I4200 — A warm UI screen borrows what its sources answered and writes its page once, so a plan of any size is not copied per request

Make the warm request path of /ui copy nothing it already holds: read the intents, issues, waves and scope pairs through view::items (borrowed) instead of view::list (a deep copy) in ui/issues.rs, ui/idd.rs (screen, render, choice, wave_panel) and ui/intent.rs's inspector; move a screen's tree into its page in ui/shell.rs::page instead of cloning it; and escape text and attribute values straight into the page buffer in cockpit/html.rs instead of through a new String each.

PŘIPRAVENO vlna 0 · p1 · profil implementation · běží samostatně

Součást M004 — Výkon je spustitelný důkaz a horká cesta nedělá žádnou kanonickou práci dvakrát.

Připraveno. Všechny závislosti jsou hotové, takže majordomus plan start I4200 bude přijato.

Cíl

Make the warm request path of /ui copy nothing it already holds: read the intents, issues, waves and scope pairs through view::items (borrowed) instead of view::list (a deep copy) in ui/issues.rs, ui/idd.rs (screen, render, choice, wave_panel) and ui/intent.rs's inspector; move a screen's tree into its page in ui/shell.rs::page instead of cloning it; and escape text and attribute values straight into the page buffer in cockpit/html.rs instead of through a new String each.

Proč

Train 5's ui-checks step 'every warm screen of the UI is within its budget' failed on #2403: system.http.ui.idd warm p95 108.3 ms and system.http.ui.issues 106.6 ms against 100 ms, and both sat at 95-110% of the budget on every runner. The data comes from cached readings, so warm cost equalled cold cost: every request deep-copied the whole intents list (four times on /ui/idd), every issue of the plan, the whole waves answer with every scope pair of the plan (79% of /ui/idd's render once the first copies were gone), and then the screen's entire element tree again to place it in the page, which on /ui/issues is a ~970 KB page of 976 rows.

Aktuální stav

Measured on d078fb2309e, both builds made the same way here (debug, RUSTFLAGS=''), `majordomus bench <id> --transport system --profile ci`, warm p95: system.http.ui.idd 17.9 ms and system.http.ui.issues 35.8 ms. view::list is `items(answer, pointer).to_vec()`; shell::page took &View and did `.child(view.main.clone())`; cockpit::html::El::write called escape(), which returns a new String, for every text and every attribute value.

Cílový stav

Warm p95 on the same build: system.http.ui.idd 6.4 ms (-64%) and system.http.ui.issues 22.2 ms (-38%), with every screen's output unchanged byte for byte, so both screens sit well inside the 100 ms budget on CI's runners without raising it.

Rozsah

  • .ai/repo/project/issues/I4200.yaml
  • apps/majordomus-cli/src/ui/issues.rs
  • apps/majordomus-cli/src/ui/idd.rs
  • apps/majordomus-cli/src/ui/intent.rs
  • apps/majordomus-cli/src/ui/shell.rs
  • apps/majordomus-cli/src/ui/mod.rs
  • apps/majordomus-cli/src/cockpit/html.rs

Mimo rozsah

  • Raising any warm budget
  • Paginating /ui/issues, which would change what the screen shows

Závislosti

Žádné. Tento úkol je kořenem grafu.

Kritéria přijetí

  • The ui and cockpit::html unit tests pass unchanged, so every screen renders the same bytes
  • bench system.http.ui.idd and system.http.ui.issues warm p95 fall by at least a third against a build of the same commit without the change
  • ui-checks' warm-budget step passes on CI without a rerun

Validace

  • cargo test --manifest-path apps/majordomus-cli/Cargo.toml --lib -- cockpit::html ui::
  • majordomus bench system.http.ui.idd --transport system --profile ci --no-write
  • majordomus bench system.http.ui.issues --transport system --profile ci --no-write

Požadované důkazy

  • warm_screens_copy_nothing
  • warm_budget_passes_on_ci

Důkazy

Nic nezaznamenáno. Za každým tokenem výše musí stát příkaz nebo artefakt, než lze tento úkol dokončit; vyprávění se odmítá.

Časová osa

zahájeno
—
ověřeno
—
dokončeno
—

Tato tři pole, důkazy výše a stav závislostí jsou vše, z čeho se stav skládá. Neexistuje žádné pole stavu, které by s nimi mohlo být v rozporu.

Canonical record: .ai/repo/project/issues/I4200.yaml. Read it back with majordomus plan show I4200.

Prohledává názvy a popisy všech stránek, které tento web publikuje.