reqlanOverviewIdeasFilesCode filesClustersAttributesGraphPrint
Ideas/extension_startup_reliability

Idea detail

extension_startup_reliability

reqlan rq/extension/startup-performance.rq:6

block done

Summary

Reqlan startup must make the activity-bar shell and contributed commands available before optional indexing, parser construction, database initialization, or language-client startup can monopolize the extension host.
The implementation contract is first_paint_contract, deferred_startup_sequence, lazy_runtime_dependencies, and development_bundle_freshness.
Operational diagnosis follows startup_diagnostics.
activation_sequence loading_state nonblocking_index extension_bundle

Jump to outbound references

Jump to inbound references

Navigation

Source file

reqlan rq/extension/startup-performance.rq

community 32

community cluster

startup-performance.rq

file cluster

reqlan rq/extension

folder cluster

status: done

status cluster

tag: Not present

tag cluster

Printable page

Static print-friendly idea sheet.

Attributes

KeyValue
tests "../../packages/extension/test/startup-gate.test.ts", "../../packages/analytical/test/workspace-index-lazy-services.test.ts"
status done

Browse all attributes

Ancestor context

first_paint_contract

The platform spinner ends only after VS Code loads the host module, calls `activate`, the provider registers, and `resolveWebviewView` assigns HTML. Reqlan assigns the lightweight HTML / Svelte shell first. The webview installs its host message listener, mounts, waits for its first animation frame, then posts the one-shot `ready` signal from a queued task. Index discovery / sync waits for that post-paint signal so synchronous parser or database setup cannot race the first visible frame. [activation.first_paint_startup] ["../../packages/extension/webviews/activity-bar/App.svelte"] ["../../packages/extension/webviews/activity-bar/state/app.svelte.ts"] ["../../packages/extension/src/extension/startup-gate.ts"]

deferred_startup_sequence

Required order: 1. Load the smallest practical host entry. 2. Synchronously register commands and the activity-bar provider; return from `activate`. 3. Assign the activity-bar shell and wait for the post-first-frame `ready` handshake. 4. Start index discovery / sync after `ready`; if the sidebar stays closed, start after a bounded three-second fallback so startup indexing and watchers are not lost. 5. Start the language client after `ready`, with a one-second fallback so language features work when the sidebar stays closed. 6. Report incremental index progress inside the already-painted sidebar. The ready signal and both startup paths are one-shot / idempotent. [activation.background_startup]

lazy_runtime_dependencies

Base discovery must be cheap: - Constructing `WorkspaceIndex` does not construct Langium / Chevrotain services; services are memoized on first parse. - sql. js asm is not parsed as part of `main.cjs`; both index stores dynamically import the generated vendor bundle when a database first opens. - Export / physics source is generated at build time rather than read via extension-runtime URLs. The host bundle consequently fell from approximately 11. 2 MB to 2. 66 MB; sql. js occupies a separate approximately 8. 0 MB lazy vendor bundle. ["../../packages/analytical/src/index-store/workspace-index.ts"] ["../../packages/analytical/src/index-store/sqlite-store.ts"] ["../../packages/analytical/src/index-store/index-diagnostics-store.ts"] ["../../packages/extension/esbuild.mjs"]

development_bundle_freshness

F5 executes `package.json.main` ( `out/extension/main.cjs` ), not TypeScript source. `out/`, generated webview media, and copied syntaxes are gitignored, so launching without a build can run missing or stale artifacts even when source already contains the fix. `.vscode/launch.json` therefore uses a deterministic pre-launch task that invokes the extension build orchestrator directly; root `pnpm run build:ext` delegates to the same script. The task content-fingerprints Langium and physics generation, each webview, packaging media, and extension-host / language-server output; `tsc -b` retains project-reference incrementality. Unchanged artifacts are verified and skipped before the development host opens. Watch mode remains useful during iteration, but concurrent watchers do not restart an already-running extension host or language-server child; stop and start F5 after host / server changes. ["../../.vscode/launch.json"] ["../../.vscode/tasks.json"]

startup_diagnostics

Diagnosis order: 1. Read the development extension host's `remoteexthost.log`; find `ExtensionService#_doActivateExtension reqlan.reqlan-extension`. 2. Distinguish code-loading time, activate-call time, and activate-resolved time. 3. If activation failed, use the first Reqlan stack frame rather than inferring a CPU hang. 4. If manifest UI exists but every command is missing, investigate module load / activation before indexing or webview data. 5. If the extension-owned " Loading Reqlan … " shell appears, provider resolution succeeded; subsequent delays belong to webview bootstrap or index readiness. 6. Confirm `out/extension/main.cjs` is newer than changed source and includes lazy `import("./vendor/sql-asm.cjs")`. CPU-idle profiles do not disprove activation failure: once `require()` throws, the host can remain healthy and mostly idle while Reqlan stays unregistered.

Outbound references

KindIdeaPathSnippet
file_reference ../../.vscode/launch.json .vscode/launch.json —
file_reference ../../.vscode/tasks.json .vscode/tasks.json —
file_reference ../../packages/analytical/scripts/generate-physics-core-source.mjs packages/analytical/scripts/generate-physics-core-source.mjs —
file_reference ../../packages/analytical/src/export/html-export-assets.ts packages/analytical/src/export/html-export-assets.ts —
file_reference ../../packages/analytical/src/index-store/index-diagnostics-store.ts packages/analytical/src/index-store/index-diagnostics-store.ts —
file_reference ../../packages/analytical/src/index-store/sqlite-store.ts packages/analytical/src/index-store/sqlite-store.ts —
file_reference ../../packages/analytical/src/index-store/workspace-index.ts packages/analytical/src/index-store/workspace-index.ts —
file_reference ../../packages/analytical/test/workspace-index-lazy-services.test.ts packages/analytical/test/workspace-index-lazy-services.test.ts —
file_reference ../../packages/extension/esbuild.mjs packages/extension/esbuild.mjs —
file_reference ../../packages/extension/src/extension/startup-gate.ts packages/extension/src/extension/startup-gate.ts —
file_reference ../../packages/extension/test/startup-gate.test.ts packages/extension/test/startup-gate.test.ts —
file_reference ../../packages/extension/webviews/activity-bar/App.svelte packages/extension/webviews/activity-bar/App.svelte —
file_reference ../../packages/extension/webviews/activity-bar/state/app.svelte.ts packages/extension/webviews/activity-bar/state/app.svelte.ts —
file_reference ../development/build.rq reqlan rq/development/build.rq —
file_reference ../indexer/indexer.rq reqlan rq/indexer/indexer.rq —
file_reference ./activation.rq reqlan rq/extension/activation.rq —
file_reference ./module/activitybar.rq reqlan rq/extension/module/activitybar.rq —
file_reference ./vendor/sql-asm.cjs reqlan rq/extension/vendor/sql-asm.cjs —
references deferred_startup_sequence reqlan rq/extension/startup-performance.rq deferred_startup_sequence
references development_bundle_freshness reqlan rq/extension/startup-performance.rq development_bundle_freshness
references first_paint_contract reqlan rq/extension/startup-performance.rq first_paint_contract
references lazy_runtime_dependencies reqlan rq/extension/startup-performance.rq lazy_runtime_dependencies
references startup_diagnostics reqlan rq/extension/startup-performance.rq startup_diagnostics

Inbound references

KindIdeaPathSnippet
None

Unresolved references

KindIdeaPathSnippet
references activation_sequence activation_sequence
references extension_bundle extension_bundle
references loading_state loading_state
references nonblocking_index nonblocking_index

Local graph

Initialising graph…