feat(sqlite): name every op in the boot log and split the identity boot bucket (0249)#345
Merged
Merged
Conversation
…ot bucket (0249) The cold-open stall keeps escaping diagnosis because the two decisive numbers are never captured: which SQL the ~15 s `execMs` op is, and how the ~9 s "identity" boot phase actually breaks down. Add both. - Worker op log now carries the op's whitespace-collapsed, param-free SQL text (`SchedulerOpReport.detail` + an optional `schedule()` arg), so a long `execMs` line names the exact statement instead of the generic `query` label. - Boot timeline splits the opaque `sqlite:schema → identity:ready` span into `probe` (cold COUNT(*)), `storageOpen`, `identityCheck`, and `identityResume` via three new marks, so the dominant sub-phase is attributable; the coarse `identity` segment is kept for back-compat and the perf panel reflects the split. Additive and behind `xnet:boot:debug`; no behaviour change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: xNet Test <test@xnet.dev>
…plit the 9s identity bucket) (0249) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: xNet Test <test@xnet.dev>
…th (0249 F1) probeStoreColdStart runs SELECT COUNT(*) FROM nodes — the first read on the cold OPFS DB — and it was awaited ahead of identity/store/connect purely to feed the "restoring from hub" affordance, which has a safe default. Fire it and forget it; mark sqlite:probe immediately so the boot timeline's probe segment is ~0, proving the cold read is no longer on the critical path. The affordance is now reactive: recordColdStartProbe notifies subscribers and useRestoringFromHub reads via useSyncExternalStore, so it still appears when the probe resolves after paint. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: xNet Test <test@xnet.dev>
… mark (0249) Adds a bridge:first-result boot phase + bridgeFirst segment (store:ready → first LIVE landing result across the bridge) and a markBridgeFirstResult() helper. With the instant shell painting from a snapshot, firstPaint no longer carries the cold read, so this segment is the number that still does — localizing the previously untraced ~5s secondary gap. The perf panel reads the new mark too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: xNet Test <test@xnet.dev>
…0249 F2) The first query on a cold OPFS DB faults its working set synchronously on the single SQLite worker (~15s in the capture), so the landing surface couldn't paint until it finished even though the data is local. Keep a tiny localStorage snapshot of the last-50 rows per landing schema (id/title/updatedAt) — read synchronously on the main thread, NOT behind the cold worker — and paint from it immediately, then switch to live data and write the snapshot through. The home surface adopts it for pages/databases/canvases via a thin useInstantRows overlay. localStorage read/write is quota-safe, idempotent, and never throws. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: xNet Test <test@xnet.dev>
I1/I2 (op-naming + identity-bucket split), F1 (probe off the awaited path), the secondary-gap tracer, and F2 (instant-shell snapshot) are implemented. The doc stays [_]: I3 (a fresh xnet:boot:debug capture) and the hub redeploy are operational, and F3/F4 are explicitly gated on what that capture shows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: xNet Test <test@xnet.dev>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: xNet Test <test@xnet.dev>
Contributor
🖼️ UI changes in this PRInteractionsAuto-captured by CI · run. Informational — not a blocking check. |
Contributor
|
Preview removed for PR #345. |
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.

The cold-open stall keeps escaping diagnosis because the two decisive numbers
are never captured: which SQL the ~15 s
execMsop is, and how the ~9 s"identity" boot phase actually breaks down. Add both.
(
SchedulerOpReport.detail+ an optionalschedule()arg), so a longexecMsline names the exact statement instead of the genericquerylabel.sqlite:schema → identity:readyspan intoprobe(cold COUNT(*)),storageOpen,identityCheck, andidentityResumevia three new marks, so the dominant sub-phase is attributable; the coarse
identitysegment is kept for back-compat and the perf panel reflects thesplit.
Additive and behind
xnet:boot:debug; no behaviour change.Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Signed-off-by: xNet Test test@xnet.dev