Skip to content

Read app-state.json once at start for the settings and first window - #2905

Draft
nortonandreev wants to merge 1 commit into
mainfrom
kcap-2734-single-state-read
Draft

nortonandreev wants to merge 1 commit into
mainfrom
kcap-2734-single-state-read

Conversation

@nortonandreev

Copy link
Copy Markdown
Contributor

Closes #2734 — AI-5624

What & why

Start-up read app-state.json once each for the UI scale, beta updates, rail preferences and the first window. It now reads it once, in the App constructor, and hands that snapshot to each. This is the "single state read" part of the issue. Trimming and ReadyToRun are reported on the issue.

Where to look

Only the first main window takes the constructor's snapshot. A later window, or one opened after setup, reads the file again, because an earlier window may have saved geometry or rail preferences since.

Verification

Tart VM (macOS 26, 4 vCPU, 4 GB), tools/app-perf/coldstart_ab.sh (#2896), 6 rounds alternating builds:

main this branch
Window on screen, median 2.26 s 2.75 s
Session rows on screen, median 2.68 s 3.02 s
CPU s in the first 10 s 3.62 3.36

The screen-time difference is within this guest's run-to-run spread. No start-up gain was measured.

…2734)

The first main window takes the constructor's snapshot; a later window or one after setup
reads afresh, since an earlier window may have saved geometry or rail preferences since.
@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

1 new problem were found

Inspection name Severity Problems
RoslynAnalyzers CancellationToken parameters must come last ◽️ 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 7 — Cut start-up CPU, one measured step at a time

1 participant