You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v0.4.1
Pass over the activate() critical path and the cockpit refresh
loop. None of the changes here need to be opted into — they apply
on every reload.
Persisted hot-path snapshots across window reloads via a new
core/persistedCache.ts helper (workspaceState wrapper). Bazel
disk-cache size, environment versions, and cmk-dev-install-site
state are read synchronously from yesterday's snapshot on first
paint and revalidated in the background — the user no longer
stares at empty Environment tiles while du and a fistful of
--version subprocesses spin up.
Bazel disk-cache probe short-circuits via fs.statSync on the
cache dir mtime; when it is unchanged since the last probe, the
expensive du -sb walk is skipped entirely.
loadConfig() now caches the parsed JSON keyed by file mtime, so
the repeated reads in refreshStateCache and the settings dialog
collapse to a single parse.
registerBazelTestController + registerBazelTestsConfigView are
deferred until the first Python / TypeScript editor activates or
10 s elapse, freeing the activate() path for vscode.git and
Pylance startup.
checkVersionMismatch and showWhatsNewIfNeeded are deferred by 2 s
so neither can pop a modal during the activate window.
The 5 s cockpit auto-refresh tick is skipped whenever the cockpit
webview is hidden — eliminates ~720 HTML rebuilds per hour of
editor work where the sidebar is not visible.
refreshOverview() now re-reads the gitState and bazelCache stale-
while-revalidate slices before rendering. Without this, the 5 s
tick (and the SWR callbacks) read back the frozen snapshot from
the last full refreshStateCache(), so re-enabling the pre-commit
hook would leave the cockpit's "bypassed" chip stuck on the
previous state until the user triggered refreshAll().
New invalidateGitState() helper plus a .git/hooks/pre-commit*
file watcher in sidebar.ts: the watcher invalidates gitState's
SWR cache and calls refreshAll() so the cockpit's "pre-commit
bypassed" chip flips within ~100 ms of toggling the hook instead
of waiting out the 5 s TTL.
The startup-regression cockpit chip now requires cmk.benchmark-
Startup to be on so stale history from a previous experiment
cannot surface a phantom warning after the flag is turned off.
The cmk.fixQaTestDataSubmodule reset now reads the tracked gitlink
SHA from the parent index and checks the submodule worktree out at
that SHA directly. The previous `git submodule update --init
--force` path fell back to the relative ../qa-test-data URL in
.gitmodules, which git 2.38+ refuses over the file:// transport —
the action used to fail with "fatal: transport 'file' not allowed"
even when the submodule was already correct.
AI-Generated: true
Change-Id: I2956fb7080eb5ee00f36f848a50f088672e6fcf5
> **Note:** Startup-perf pass aimed at flattening cold-reload cost. None of
4
+
> the changes below need to be opted into — they apply on every reload.
5
+
6
+
### Persistence across window reloads
7
+
8
+
-**perf**: persist the Bazel disk-cache size snapshot in `workspaceState`; the next reload returns yesterday's value synchronously instead of waiting for `du -sb` to complete
9
+
-**perf**: persist the environment-versions snapshot (Python / Node / Bazel / Bazelisk / Docker / GCC) so the Environment grid paints from the previous session immediately
10
+
-**perf**: persist the `cmk-dev-install-site` install state so the OMD section's "Create Site" button is correct on first paint without re-shelling out
11
+
- New `src/core/persistedCache.ts` helper centralises the load/save of these workspace-state snapshots
12
+
13
+
### Skip work that hasn't changed
14
+
15
+
-**perf**: short-circuit the Bazel disk-cache probe when the cache directory's mtime is unchanged since the last run — `du -sb` is replaced by a single `fs.statSync` on hot paths
16
+
-**perf**: `loadConfig()` reads the JSON file only when its mtime changes; subsequent calls (every `refreshStateCache`, every settings dialog) return the cached parsed object
17
+
18
+
### Activate critical path
19
+
20
+
-**perf**: defer `registerBazelTestController` + `registerBazelTestsConfigView` until the first Python / TypeScript editor activates, or 10 s elapse — whichever fires first
21
+
-**perf**: defer `checkVersionMismatch` + `showWhatsNewIfNeeded` by 2 s so neither can pop a modal during the activate window
22
+
23
+
### Sidebar churn
24
+
25
+
-**perf**: the 5 s cockpit auto-refresh tick is skipped while the cockpit webview is hidden — saves ~720 HTML rebuilds per hour of editor work
26
+
27
+
### Cockpit freshness
28
+
29
+
-**fix**: `refreshOverview()` now re-reads the gitState and bazelCache stale-while-revalidate slices before rendering — re-enabling the pre-commit hook (or any other state covered by a SWR getter) clears the cockpit chip on the next 5 s tick instead of being stuck on the frozen snapshot from the last full state refresh
30
+
-**fix**: new `.git/hooks/pre-commit*` watcher invalidates gitState's TTL and triggers `refreshAll()` on toggle, so the cockpit chip flips within ~100 ms instead of waiting for the next 5 s tick
31
+
-**fix**: `cmk.fixQaTestDataSubmodule` no longer shells out to `git submodule update --init --force --checkout`, which on git 2.38+ falls back to the relative `../qa-test-data` URL in `.gitmodules` and fails with `fatal: transport 'file' not allowed`. Reads the tracked gitlink SHA via `git ls-tree HEAD tests/qa-test-data` and checks the submodule worktree out at that SHA directly, fetching only when the SHA is not already local
32
+
33
+
### Startup regression banner
34
+
35
+
-**fix**: the cockpit's "Startup performance" regression chip now only fires when the benchmark setting is on; stale history from a previous experiment can no longer surface a phantom warning
0 commit comments