Skip to content

Record window, first session rows and start-up phase times - #2900

Draft
nortonandreev wants to merge 3 commits into
mainfrom
kcap-2732-startup-marks
Draft

nortonandreev wants to merge 3 commits into
mainfrom
kcap-2732-startup-marks

Conversation

@nortonandreev

Copy link
Copy Markdown
Contributor

Closes #2732 — AI-5622

What & why

app-lifecycle.jsonl had app_started and tray_created and nothing for what the user waits for. It now gets window_shown and first_sessions_painted, each written once per process. startup_phases records the durations of gate evaluation, graph build and window build. Each mark carries since_start_ms, measured from the OS process start time, so a user's log shows where a slow start went.

Where to look

RenderedFrame.WhenDrawn: a mark counts only a compositor frame drawn while the window stayed shown. first_sessions_painted also needs a laid-out row inside the rail's visible scroll area, not just an expanded group somewhere below it.

Verification

Tart VM (macOS 26.6.2, 4 vCPU, 4 GB), local server 1.4.1, tools/app-perf/coldstart.sh (#2896), 6 runs. The marks agree with OCR of a screenshot loop:

Mark median Screen (OCR) median
window_shown 1,845 ms 2.11 s
first_sessions_painted 2,342 ms 2.45 s
startup_phases gate 114, graph 338, window 604 ms

Regression tests cover a window hidden before it renders, a viewport ending 1 px above the first row, and a group expanded below the viewport. Passing: AppStartupTests 30, MainWindowSmokeTests 70, SessionRailFirstPaintSmokeTests 4, RenderedFrameSmokeTests 1, StartupMarksTests 5.

Times are taken from the kernel's process start, so runtime start-up counts too, and the
window and rows marks wait for the compositor's Rendered signal rather than data or Show().
A frame still renders for a window hidden before it drew, and rows realized below folded
groups are laid out without being on screen; neither now records a mark.
…wn (#2732)

A compositor batch completes for a window hidden before it drew, so each attempt is voided by
a hide and re-armed; a row counts only when its own bounds, not its list's, meet the viewport.
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

Copy link
Copy Markdown

Qodana for .NET

11 new problems were found

Inspection name Severity Problems
Access to modified captured variable 🔶 Warning 5
Do not use object initializer for 'using' variable 🔶 Warning 2
Use object or collection initializer when possible ◽️ Notice 2
Replace with 'field' keyword ◽️ Notice 1
Merge null/pattern checks into complex pattern ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

This branch has not been deployed

No deployments
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.

[App perf] Task 5 — Record start-up phases

1 participant