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
{{ message }}
Repository navigation
Commit 5fcc4fc
Browse filesBrowse the repository at this point in the historyBrowse files
doctor: name the slow step instead of "None needed"; sync-folder check; plain-words advice (#596)
Fast process starts but one bench step 5x+ and 2 s+ over reference -> that step's fix (git: core.untrackedCache / core.fsmonitor). Project inside OneDrive/Dropbox/Google Drive/iCloud (whole path components) -> health WARN and "move the project". Low memory -> restart first, --cleanup as alternative. Bench git step warms up once. speed-setup.md: never say deno/mxbuild/helper to users.
Review: MERGE-AFTER-FIX — sync-folder match on whole path components, bench wording, skill order fixed; re-reviewed MERGE (nit: long header comment)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ Sections dated before 2026-09-19 predate the cycle and stay as they are. Named m
19
19
20
20
## Unreleased
21
21
22
+
- fix(doctor, speed-setup): **doctor no longer says "None needed" next to a verdict of "5x slower"**: when process starts are fast but one bench step is 5x+ the reference and 2 s+ slower, the Recommended fix names that step (slow git status: `git config core.untrackedCache true` / `core.fsmonitor true`, no admin rights); a project inside a OneDrive / Dropbox / Google Drive / iCloud folder gets a Machine health warning and "move the project to a local folder" as the fix; low-memory advice now offers "restart the computer" before `--cleanup`; the bench's git step runs one untimed warm-up so a stale index after a copy or clone no longer reads as slow (field, ab-581/gk: 18.3 s cold, 31 ms warm); `skills/speed-setup.md` tells Claude never to say deno, mxbuild or helper process to a user. Field run: ab-581/gk on Linux, bench 14.7 s vs 10.9 s, "None needed" correctly; a project under a OneDrive path, move advice shown — Maurits (mauritscgvisser)
22
23
- fix(gate-check, gate-cache): **the closeout verdict cache also keys on file CONTENT, so an overwrite that keeps an old mtime (`cp -p`, `rsync -t`, `tar x`, `unzip`, `touch -d`) can no longer replay a stale verdict**: a signed triage.md copied over a FAIL one still printed the cached Stage 0 FAIL (PR #589 review); the cache now stores one `find | sort | xargs cksum | cksum` signature of the project files (skipping .git, node_modules, .mxtk, mprcontents, deployment, *.mpr, files over 1 MB) and any difference, or a signature that cannot be computed, re-evaluates; new `tests/wave2/test-gate-cache.sh` (hit, edit/delete/waiver miss, cp -p miss, TTL 0, 'not evaluated' line); `MXTK_GATE_CACHE_TRACE=1` prints `gate-cache: hit|miss` on --closeout. Field run: ab-581/base copy (197 MB, 633 hashed files) - signature 28 ms, cache hit 1464 -> 1498 ms vs 2567-2786 ms full evaluation - PR #589 reviewer, OlafFede (#583) — OlafFede (#583)
23
24
- perf(gate-check, closeout): **a Stage close starts about 70% fewer processes (Stage 3 on a small project: `--closeout` 820 -> 127 starts, `gate-check <dir> 3` 560 -> 275, no-stage run 626 -> 338; verdict lines unchanged)**: (1) `--closeout` replays the evaluation of the stage query that just ran (variables snapshotted in `<project>/.mxtk/gate-cache`, valid only while nothing under the project or the toolkit is newer than that run and the key matches; any doubt re-evaluates; `MXTK_GATE_CACHE_TTL_MIN=0` turns it off); (2) a stage query no longer evaluates obligation/artifact rows owed from later stages and says how many it skipped (the summary line is labelled the same way); (3) the register is parsed once per run instead of one awk per lookup; (4) the toolkit `git fetch` runs at most once per 15 min (`MXTK_FETCH_TTL_MIN`, `MXTK_NO_FETCH=1` unchanged); plus pure-bash trimming in the close-out block and the obligation reverse check. Reported by OlafFede (#583). — OlafFede (#583)
24
25
- new(doctor, speed-setup): **`bin/doctor.sh --bench [<project>]`** times 50 process starts, git status, python/node start, one gate-check, an mxcli check and (on a COPY of the model) mx check against measured reference constants, prints one verdict line and writes `.claude/loop/bench-<timestamp>.tsv` for comparing machines; a **Machine health** section (normal run and `--bench`) warns on leftover mxbuild `deno` helpers and free memory under 2 GB (mxbuild is killed with exit 137 when memory runs out), `--cleanup` stops exactly those helpers after a typed y (no tty: prints the command); both runs end with ONE **Recommended fix** block (Gate mode: check, else WSL, dev container, or Claude in the cloud; antivirus-exclusion advice removed, it needed IT); new `skills/speed-setup.md`. Field run: ab-581/gk on Linux 4 cores, 46 orphan deno helpers found, bench 10.4 s vs 10.9 s reference — Maurits (mauritscgvisser)
echo" git is slow in this project (git status: $(( (B_TOP_EXCESS + BENCH_REF_GIT_MS) /100/10)).$(( (B_TOP_EXCESS + BENCH_REF_GIT_MS) /100%10)) s; normal is well under 1 s)."
468
+
echo" Turn on git's own file cache for this project (no install, no admin rights):"
469
+
echo" git config core.untrackedCache true"
470
+
[ "$MH_OS"!= linux ] &&echo" git config core.fsmonitor true"
471
+
echo" Then run doctor --bench again. Still slow: check that no large build output or source dump is"
472
+
echo" tracked in git (git count-objects -vH)." ;;
473
+
*)
474
+
echo" One step is much slower than the reference: $B_TOP_LABEL. Process starts are fine, so this is"
475
+
echo" probably a one-off (first run after a restart or an update). Run doctor --bench once more; if"
476
+
echo" the same step is still slow, send the results file to the toolkit maintainers." ;;
477
+
esac
453
478
return 0
454
479
fi
455
480
if [ "$_rf_slow"= 0 ];then
@@ -593,6 +618,17 @@ machine_health() {
593
618
else
594
619
ok "no leftover mxbuild helper processes"
595
620
fi
621
+
# Project inside a file-sync folder (OneDrive is where Windows puts Documents and Desktop by default).
[ -n"$MH_SYNC" ] && advise "the project is in a folder synced by $MH_SYNC: $_mh_pd"
596
632
MH_BAD="$_mh_bad"
597
633
if [ "$_mh_bad"= 1 ];then
598
634
note "When memory runs out the operating system kills mxbuild (exit 137), and the build gate then reads"
@@ -644,7 +680,7 @@ if [ "$CLEANUP" = 1 ]; then
644
680
exit 0
645
681
fi
646
682
647
-
# --bench: ~1 minute, changes nothing in the project. Times the things every toolkit script is made of,
683
+
# --bench: ~1 minute, changes nothing in the project (only git's own stat cache, via the warm-up below). Times the things every toolkit script is made of,
648
684
# against this table's reference column, so "the toolkit is slow here" becomes a number a colleague can
649
685
# compare. Writes <project>/.claude/loop/bench-<timestamp>.tsv (one row per step, concatenable).
650
686
#
@@ -699,15 +735,16 @@ b_fmt_ms() {
699
735
}
700
736
701
737
# b_row <id> <label> <this-ms|""> <ref-ms> <note> — print the table row, append the TSV row, feed the verdict.
Copy file name to clipboardExpand all lines: skills/speed-setup.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,12 @@ The user complains about speed, asks to update the toolkit and check whether it
7
7
8
8
## Steps (in order; the user is asked before every change, except the read-only ones)
9
9
0. Update first. Check that the toolkit clone was pulled (`git -C <toolkit> status -sb` shows it is not behind; if it is, ask before pulling). Then run `<toolkit>/bin/sync-project.sh <project>`. Report in plain words what sync changed, and every locally modified script it KEPT (it never overwrites those; say which, and that `--upgrade-bin <name>` replaces one after a backup, only if the user asks).
10
-
1. Run `bin/doctor.sh --bench .` from the project root. It changes nothing and takes about a minute. Read the table (step, this machine, reference, factor), the "Machine health" lines and the closing "Recommended fix" block.
11
-
2. VALIDATE first: is this machine slower than it should be? Use the verdict line and the Machine health lines. If the verdict says about as fast as the reference, Machine health is clean and the block says "None needed", say so in ONE line ("This machine is already fast: <verdict>") and STOP. Do not propose a fix for a fast machine. Otherwise say the result in ONE plain sentence, from the verdict line, for example: "This machine is 6x slower than the reference, mainly because every process start takes 100 ms instead of 2 ms." If Machine health warned (leftover helpers, under 2 GB free), say that first: run `bin/doctor.sh --cleanup`, which asks before stopping anything.
10
+
1. Run `bin/doctor.sh --bench .` from the project root. It changes no project file (only git's own stat cache, as any git status does) and takes about a minute. Read the table (step, this machine, reference, factor), the "Machine health" lines and the closing "Recommended fix" block.
11
+
2. VALIDATE first: is this machine slower than it should be? Use the verdict line and the Machine health lines. If the verdict says about as fast as the reference, Machine health is clean and the block says "None needed", say so in ONE line ("This machine is already fast: <verdict>") and STOP. Do not propose a fix for a fast machine. Otherwise say the result in ONE plain sentence, from the verdict line, for example: "This machine is 6x slower than the reference, mainly because every process start takes 100 ms instead of 2 ms." If Machine health warned, say that first, in words a non-developer knows. Users do not know what deno, mxbuild or a helper process is; never use those words to them. Wrong: "47 leftover deno helpers, run --cleanup?" Right: "Mendix build processes that were left running hold 3 GB of memory. Restarting your computer clears them; or I can stop just those now, if you say yes (`bin/doctor.sh --cleanup`)." For a project in a OneDrive/Dropbox/iCloud folder, the fix is moving the project to a local folder (the Recommended fix says how).
12
12
3. Only when step 2 found a problem: carry out the "Recommended fix" with the user. It names ONE option, the first that works here:
13
13
-**Remove `Gate mode: full` from PROJECT.md** (the quick `mx check` per write is the default). Show the line, ask, remove it. Nothing else changes.
14
+
-**Move the project out of a synced folder** (OneDrive, Dropbox, Google Drive, iCloud). Ask, then move or re-clone it to the local folder the block names, and reopen it there. This comes before WSL, a dev container or the cloud: a synced folder slows every option, so move first and bench again.
15
+
-**Turn on git's file cache** (git status slow, process starts fine): the `git config` lines the block prints, in the project, after asking.
14
16
-**Run the toolkit in WSL** (Windows, WSL already present). Guide: open the WSL shell, clone the project inside the WSL filesystem (not under /mnt/c), run `bin/doctor.sh` there. Ask before each step.
15
17
-**Use a dev container** (docker or podman already runs). Guide through the project's container setup; ask before each step.
16
18
-**Let Claude work in the cloud** (Claude Code on the web). The user pulls the result into Studio Pro with `git pull`. Nothing is installed locally.
0 commit comments