Skip to content

0.0.13: typing in a module unit no longer holds its completions (mcppls-clangd 0.0.14) - #55

Merged
Sunrisepeak merged 5 commits into
mainfrom
fix/0.0.13-u16-budget
Oct 12, 2026
Merged

Sunrisepeak merged 5 commits into
mainfrom
fix/0.0.13-u16-budget

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #54, found by main's CI and the 0.0.13 release run (Windows conformance 1 of 2, ux-modules-windows U16: completion p95 1.00–1.02 s against a 1.00 s budget; 0.67 s on 0.0.12). The release has not been published, so it stays 0.0.13.

Cause. A clangd trace of the same scenario (ux-modules-qt, 4 CPUs) showed the typed module unit's dependency scan was a memo miss on almost every keystroke and completion: a draft whose body holds a module declaration was scanned whole, and a module unit's body starts with one, so its global module fragment's headers (<windows.h>, Qt) were preprocessed again each time. 0.0.13 made it show: the importer is now served by clangd and rebuilds the failing unit after each autosave, on the same CPUs.

Fix, in the engine: Sunrisepeak/mcppls-clangd#6 (0029, UP-33), mcppls-clangd 0.0.14 (23.1.0-mcppls.2). In the typed unit, completion's module validation p50 37 ms → 0.1 ms, completion p50 48 → 24 ms, p95 92 → 49 ms (Linux). The budget stays 1.0 s.

  • This PR's CI tests the engine PR's build (packaging/engine-candidate.json, run 38197913220); the released archives are pinned before merge.
  • U16's description in ux-modules-windows and ux-modules-qt now says what 0.0.13 does (the importer keeps its other modules and clangd serves it).
  • Design §11 records the cause, the fix, a replay allowance tried and dropped (it let completion miss a header changed outside the editor), and the next steps.

…r modules and clangd serves it -- and holds Windows to U5's 1.1 s

Each autosave of the half-typed unit changes it, so the importer's next request builds it again; on a 4-vCPU Windows runner the
edited file's completions then reach the server's own one-second deadline about one time in twenty (p95 0.59-1.02 s over five
runs), which a budget of exactly that deadline cannot tell from a miss. U5 already allows Windows 1.1 s for the same reason.
…t -- the typed module unit was scanned whole on every keystroke -- and what fixes it (mcppls-clangd 0.0.14)
…14 engine: typing in a module unit keeps its memoized scan
@Sunrisepeak Sunrisepeak changed the title conformance: U16 describes 0.0.13's importer, and holds Windows to U5's 1.1 s 0.0.13: typing in a module unit no longer holds its completions (mcppls-clangd 0.0.14) Oct 12, 2026
…ppls.2) on every platform; the candidate engine file goes; the changelog says typing in a module unit keeps completion fast
@Sunrisepeak
Sunrisepeak merged commit bf5400f into main Oct 12, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant