perf: speed up app initialization and add startup timing telemetry (THU-595)#984
Merged
ital0 merged 6 commits intoJun 15, 2026
Merged
Conversation
Semgrep Security ScanNo security issues found. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit dc0a5ea. Configure here.
|
Preview environment destroyed 🧹 Stack |
PR Metrics
Updated Mon, 15 Jun 2026 15:53:49 GMT · run #1885 |
darkbanjo
previously approved these changes
Jun 15, 2026
def6e7d to
de568bf
Compare
raivieiraadriano92
approved these changes
Jun 15, 2026
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.

Note
Medium Risk
Touches core boot path (DB init, sync gate, defaults reconciliation) and changes how PowerSync is imported at startup; failures are mostly telemetry or best-effort sync, but regressions could affect time-to-interactive or sync readiness.
Overview
Adds startup performance telemetry (
app_init_timingafter init completes,app_chat_readyon first chat hydration) via a lightweightinit-timingmodule that records bundle eval, first mount, per-step durations, sync gate outcome, and total time.Init pipeline changes overlap config fetch with later steps, add a first
select 1step to absorb PowerSync’s deferred DB ready work, time data migrations, run tray and PostHog init in parallel, and reportinitial_sync_outcome(disabled/synced/timed_out/failed) fromwaitForInitialSync.Bundle-size work moves sync helpers into SDK-free
sync-state.ts(entry code imports that path instead of the PowerSync barrel), plus Vite treeshake/alias tweaks so more@powersync/commonstays in the lazy PowerSync chunk.Boot DB work batches default reconciliation lookups and reduces redundant queries in removed-default cleanup.
Reviewed by Cursor Bugbot for commit de568bf. Bugbot is set up for automated code reviews on this repo. Configure here.