Repository navigation
chore(today): trace the standalone Today window's cold open - #3359
Open
lodyai[bot] wants to merge 2 commits into
Open
lodyai[bot] wants to merge 2 commits into
lodyai[bot] wants to merge 2 commits into
Conversation
Each open of the desktop Today window cold-boots a renderer, and users report it as slow. Record its boot phases in the renderer and log them from main as one JSON line per open, so the dominant cost can be measured on real workspaces before choosing a fix. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Model: claude-opus-5.5
Model: gpt-6.2-sol
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
$## Summary
Every open of the desktop Today (每日笔记) window cold-boots a new renderer and is reported as slow. This PR only adds measurement; it changes no behavior.
lib/today/today-window-boot-timeline.tsrecords renderer phases (entry, i18n, route, runtime create, workspace scope ready, top page acquired, content painted, page synced). It is a no-op outside the Today window.today-windows.tsadds main milestones (created, did-finish-load, ready-to-show, shown) and logs one[today-window] boot timelineJSON line per cold open.Findings (OSS desktop via the E2E harness, Linux arm64 + Xvfb, Playwright tracing off)
Click to painted content: about 1.10 s on an empty workspace, 1.55 s with 300 sessions. The window shows a boot shell at about 0.18 s.
docMetaScope.ready(full metadata scan)The metadata gate grows by about 1.1 ms per session, and the Today pages do not need it. Most of the remaining cost (process, bundle, routing) is unrelated to the storage engine, so it does not need to wait for the loro-repo-rs integration.
Candidate follow-ups, not in this PR: let the Today window skip the doc-meta gate; keep the window alive on close or prewarm it (that needs an owner decision against the default of no hidden renderer); slim the boot bundle or enable a V8 code cache.
Test plan
pnpm check: typecheck and quick checks pass. One components test (conversation-text-selection) failed under full-suite load and passes on its own; it is unrelated.pnpm formatGenerated with Devin