969 lines
63 KiB
Markdown
969 lines
63 KiB
Markdown
# lucisv performance against opentitan — take 4
|
||
|
||
Same corpus, same scenarios, same machine as [`performance.md`](performance.md)
|
||
(take 1), [`performance_take2.md`](performance_take2.md) (take 2) and
|
||
[`performance_take3.md`](performance_take3.md) (take 3). Take 3 measured
|
||
**0.43.0** against **0.39.0**. Take 4 measures **0.49.0 (`4c2dae3`)** against
|
||
**0.43.0 (`73799f3`)**, and every table carries take 3's own 0.43.0 column
|
||
beside a *fresh* 0.43.0 column taken tonight, with tonight's harness, so each
|
||
row is a before/after with the harness held fixed.
|
||
|
||
Six releases separate the two binaries. Four of them added a refactoring
|
||
(§50 expand `.*`, §51 convert to ANSI, §52 organize imports, §53 extract and
|
||
inline module), one fixed the `didOpen` delay take 3 filed (§46), one added a
|
||
hierarchical member surface to rename and completion (§49), and one bumped the
|
||
index's on-disk format (18 → 19). All six show up below.
|
||
|
||
Every LSP number is a client-observed round trip on a monotonic clock
|
||
(`time.perf_counter`) — what the editor, and therefore the user, actually
|
||
experiences. **Read §9 before quoting any of them**: this machine was busier
|
||
than take 3's.
|
||
|
||
**The harness is committed this time.** `tools/perf/` — see §10.
|
||
|
||
---
|
||
|
||
## 0. The transport baseline, and the server's own clock beside the wire
|
||
|
||
Take 3 established that the shipped `--verbose` flag
|
||
(`docs/features/verbose-timing/`) logs `timing: <method> answered in <n> ms`
|
||
per request, and that the wire is the server plus 0.2–0.4 ms. Take 4 re-takes
|
||
that cross-check on both binaries. Nothing was instrumented for this round:
|
||
the default (no `--verbose`) sessions produce every number in this document,
|
||
and one supplementary session per shape was re-run *with* `--verbose`.
|
||
|
||
| `codeAction` at the cursor | wire, no `--verbose` | wire, `--verbose` session | the server's own line |
|
||
|---|---:|---:|---:|
|
||
| **0.49.0** `prim_flop_2sync` (128), eager | 481.6 / 468.2–477.3 ms | 508.5 / 469.4–488.2 ms | 508.2 / 469.1–488.0 ms |
|
||
| **0.49.0** `prim_flop_2sync` (128), lazy | 15.8 / 7.8–11.0 ms | 9.0 / 6.6–8.0 ms | 8.8 / 6.5–7.8 ms |
|
||
| **0.49.0** `aes` (6), eager | 119.4 / 87.6–91.9 ms | 118.9 / 87.6–91.5 ms | 117.9 / 87.4–91.4 ms |
|
||
| **0.49.0** comment line | 5.9 / 2.3–2.9 ms | 4.1 / 1.9–2.9 ms | 3.5 / 1.8–2.6 ms |
|
||
| **0.43.0** `prim_flop_2sync` (128), eager | 239.3 / 238.0–239.7 ms | 255.8 / 237.8–239.5 ms | 255.6 / 237.6–239.3 ms |
|
||
| **0.43.0** `prim_flop_2sync` (128), lazy | 19.4 / 12.5–13.2 ms | 16.7 / 10.2–12.4 ms | 16.4 / 10.0–12.2 ms |
|
||
| **0.43.0** `aes` (6), eager | 75.2 / 43.5–43.9 ms | 70.9 / 43.2–44.0 ms | 70.5 / 43.0–43.8 ms |
|
||
| **0.43.0** comment line | 3.9 / 1.3–2.1 ms | 4.7 / 1.1–1.9 ms | 4.3 / 1.0–1.8 ms |
|
||
|
||
**The wire is the server plus 0.1–0.3 ms on every repeat (worst single reading 1.2 ms, a first try).** Take 3's finding
|
||
holds one release later and on a different harness, which is worth one line:
|
||
it means every large movement below is server work, not transport.
|
||
|
||
The transport baseline — an unknown method, `$/lucisvNoSuchMethod`, rejected
|
||
without work:
|
||
|
||
| | take 1 | take 2 | take 3 (0.43.0) | **take 4, 0.49.0** | **take 4, 0.43.0** |
|
||
|---|---:|---:|---:|---:|---:|
|
||
| first in a settled session | 0.02 ms | 0.019 ms | 0.24 ms | **0.63 ms** | **0.17 ms** |
|
||
| repeats | ≈0.05 ms | ≈0.05 ms | 0.059–0.092 ms | **0.09–0.32 ms** | **0.04–0.06 ms** |
|
||
|
||
The two take-4 columns are the same client, minutes apart, and they differ by
|
||
3–5×. **That is the noise floor of this machine, not a property of either
|
||
binary**, and it is the reason no conclusion below is drawn from any movement
|
||
under 0.5 ms. §8.9 lists them and dismisses them.
|
||
|
||
---
|
||
|
||
## 1. Environment and provenance
|
||
|
||
| | take 3 | **take 4** |
|
||
|---|---|---|
|
||
| Machine | Apple M1 Max, 10 cores, 64 GB | **same machine** |
|
||
| OS | macOS 27.0 (26A5425a) | macOS 27.0 (**26A5425a**) — same build |
|
||
| Date | 2026-09-05 ~02:45–04:00 | **2026-09-07 ~02:44–03:25** |
|
||
| Server under test | 0.43.0 `73799f3`, 5 676 528 B | **0.49.0 `4c2dae3`, `target/release/lucisv-server`, 6 273 184 B, sha256 `c6e40ecd…`**, Mach-O arm64 |
|
||
| Baseline server | 0.39.0, built for the round | **0.43.0 `73799f3`, 5 676 592 B, sha256 `7f0f27d6…`** — built for this round in a scratch `git worktree` at `v0.43.0` (`cargo build --release -p lucisv_server`, 57.75 s), removed afterwards |
|
||
| CLI binaries | 0.43.0 / 0.41.0 / 0.39.0 | **0.49.0 (3 236 768 B, `0c943c4c…`), 0.43.0 (2 828 576 B, `89379a12…`), 0.39.0 (2 770 688 B, `4caf841f…`)** from `~/.cache/lucisv-baselines/` |
|
||
| Corpus | `/Users/guoliangchen/repo/opentitan` @ `0098135264` | **same commit**, 3 976 indexed + 3 skipped, same three pre-existing modified files |
|
||
| Scenario file | `hw/ip/aes/dv/tb/tb.sv`; `aes` at 0-based 44:2 | same file, same position, resolved from the text at run time |
|
||
| Client | `scratchpad/perf3/*.py` (gone) | **`tools/perf/` — committed** (§10) |
|
||
| Guard | every run, no kill | **every server session, every `lucisv` invocation and the one `cargo build` went through `tools/guard.sh -m 8 -t 1800`. No guard kill occurred.** |
|
||
| Machine state | load 2–4, quiet | **load 3.7–7.1 throughout** — a live desktop session (WindowServer 45–51%, loginwindow 24–29%). See §9 |
|
||
|
||
### 1a. Why tonight's 0.43.0 column is the one to read
|
||
|
||
Take 3's 0.43.0 numbers were taken on a quieter machine with a different
|
||
Python client. Tonight's were taken on this machine, with this client, within
|
||
one hour of the 0.49.0 numbers beside them. **Every conclusion in this
|
||
document is drawn from a take-4 pair**; take 3's column is carried so a reader
|
||
can see the three-round trend, and where the two 0.43.0 columns disagree that
|
||
disagreement is the machine and the harness, which §9 quantifies.
|
||
|
||
### 1b. The corpus is unchanged from take 3
|
||
|
||
`hw/ip/aes/dv/tb/tb.sv` is still modified and still lucisv-clean, so
|
||
`textDocument/diagnostic` still returns **0 items** and the `aes`
|
||
instantiation still raises no quick fix. The other two modified files
|
||
(`hw/top_{darjeeling,earlgrey}/ip/ast/rtl/ast.sv`) are in no scenario.
|
||
`git -C opentitan status --porcelain` was checked after every phase and
|
||
reported exactly those three files every time.
|
||
|
||
### 1c. What the client does
|
||
|
||
Framed JSON-RPC over the server's stdio; `workspace/configuration` answered
|
||
with a per-session scope word; cache warmth controlled through
|
||
`initializationOptions.storagePath`; client capabilities settable per session
|
||
(with and without `codeAction.resolveSupport.properties: ["edit"]`, so the
|
||
lazy and eager `codeAction` shapes are both measurable); every request timed
|
||
from send to response. Three differences from take 3's, all deliberate:
|
||
|
||
1. **Positions are resolved from the file text at run time**, by searching for
|
||
the token, not by a hard-coded line number. Every 0-based position quoted
|
||
below is what that search resolved to on `0098135264`.
|
||
2. **The scan barrier is 1.5 s of silence, not the `$/progress` `end`.** The
|
||
end report is followed by more indexing chatter, so silence is the honest
|
||
barrier. Take 3 used the same rule.
|
||
3. **There is a `probe` phase**, and it is how §6b's new offer sites were
|
||
found rather than guessed.
|
||
|
||
---
|
||
|
||
## 2. Summary table — worst first, take 3 → take 4
|
||
|
||
Workspace scope, warm cache, unless the row says otherwise. "Repeats" is the
|
||
range over the 2nd–4th identical request in the same session; "first" is that
|
||
request issued as the first real request of a dedicated session, after the
|
||
scan settled.
|
||
|
||
| Action | T3's 0.43.0 | **0.43.0 tonight** | **0.49.0** |
|
||
|---|---:|---:|---:|
|
||
| Workspace scan, **cold** cache (didOpen → 3 976 indexed) | 2 867 / 2 754–2 773 ms | **2 645 / 2 640–2 656 ms** | **2 712 / 2 691–2 712 ms** |
|
||
| `didOpen pinmux_reg_top.sv` (42 192 L) → the request behind it | *not measured* | **1 605 / 1 604–1 611 ms** | **112 / 128–131 ms** |
|
||
| Workspace scan, **warm** cache | 1 229.8 / 1 220.5–1 229.7 ms | **1 173.4 / 1 167.1–1 173.6 ms** | **1 266.1 / 1 239.8–1 285.6 ms** |
|
||
| First `didOpen` of an RTL file at the **default** scope (`aes.sv`, widens to `hw/ip`) | 1 081.6 cold / 365.1 warm | **1 046.6 / 1 019.8–1 042.0 cold; 344.9 / 338.9–340.4 warm** | **1 072.4 / 1 051.4–1 075.8 cold; 367.0 / 351.0–378.1 warm** |
|
||
| `textDocument/rename` on a net named through an **instance tail** (§49) | *no such answer* | **88.0 / 65.8–66.7 ms, 1 file, tail NOT edited** | **793.2 / 750.7–751.9 ms, 2 files, tail edited** |
|
||
| `textDocument/codeAction`, `prim_flop_2sync` (128), **eager** client | 270.2 / 252.9–255.2 ms | **267.1 / 238.6–243.3 ms** | **511.8 / 467.1–473.6 ms** |
|
||
| `textDocument/codeAction`, `prim_alert_sender` (67), eager | 213.4 / 196.0–196.5 ms | **211.5 / 183.0–192.4 ms** | **405.1 / 362.3–368.8 ms** |
|
||
| `textDocument/codeAction`, `prim_lc_sync` (42), eager | 148.0 / 128.9–130.4 ms | **138.6 / 121.5–124.9 ms** | **270.0 / 254.7–255.7 ms** |
|
||
| `codeAction` at `aes_wrap.sv` 78:2, eager (the one offering cursor) | 143.8 / 123.9–124.4 ms | **145.6 / 115.4–118.6 ms** | **167.9 / 159.9–160.9 ms** |
|
||
| `codeAction/resolve` at that cursor | 119.5 / 119.5–121.9 ms | **111.0 / 110.4–112.7 ms** | **163.9 / 158.2–159.5 ms** |
|
||
| `textDocument/rename` on `aes` (edits computed, not applied) | 151.8 / 139.1–140.7 ms (9 files) | **159.8 / 133.2–136.2 ms (9)** | **165.1 / 133.5–139.4 ms (9)** |
|
||
| — anything queued behind that rename | 160.8 ms | **159.3 / 132.8–157.9 ms** | **160.7 / 145.1–161.7 ms** |
|
||
| diagnostics **publish** after a `didChange` (~150 ms is the debounce) | 161.1 / 159.6–163.4 ms | **164.0 / 164.3–167.4 ms** | **164.5 / 153.5–160.7 ms** |
|
||
| `textDocument/codeAction`, `aes` (6), eager | 66.1 / 45.7–48.2 ms | **61.5 / 43.5–46.1 ms** | **114.0 / 88.3–90.7 ms** |
|
||
| `didOpen spi_device.sv` (1 985 L) → the request behind it | *not measured* | **98.7 / 75.2–99.5 ms** | **15.5 / 13.8–15.1 ms** |
|
||
| `expand .*` resolve at `sha3_fpv.sv` 54:4 (32 connections) | *no such action* | *no such action* | **67.8 / 66.9–67.0 ms** |
|
||
| `didOpen aes_core.sv` (1 145 L) → the request behind it | *not measured* | **42.6 / 63.0–63.1 ms** | **11.0 / 4.0–10.4 ms** |
|
||
| `codeAction` offer at `aes_wrap.sv` 78:2, **lazy** | 33.3 / 21.2–26.8 ms | **20.8 / 18.9–20.2 ms** | **28.6 / 23.6–24.4 ms** |
|
||
| `codeAction`, `aes_reg_top` (fan-out 1), lazy | 27.1 / 16.4–20.6 ms | **17.6 / 14.2–15.2 ms** | **29.8 / 21.8–23.5 ms** |
|
||
| `lucisv/moduleHierarchy` (1 546 modules, 2.6 MB) | *not measured* | **70.3 / 41.0–48.8 ms** | **76.2 / 41.1–53.8 ms** |
|
||
| `codeAction`, `prim_flop_2sync` (128), **lazy** (the offer) | 24.0 / 15.6–16.9 ms | **16.7 / 10.5–13.2 ms** | **15.0 / 8.1–10.5 ms** |
|
||
| `workspace/symbol "aes"` (256 results) | 8.8 / 7.2–7.9 ms | **18.2 / 8.2–13.3 ms** | **18.2 / 8.7–12.7 ms** |
|
||
| — anything queued behind it | 11.0 ms | **17.7 / 17.9–18.4 ms** | **18.4 / 15.2–18.0 ms** |
|
||
| `codeAction`, `prim_alert_sender` (67), lazy | 14.8 / 8.6–10.8 ms | **14.7 / 8.5–12.2 ms** | **13.2 / 9.0–11.5 ms** |
|
||
| `codeAction` **on the `aes` instantiation**, lazy | 5.15 / 4.05–4.24 ms | **7.4 / 4.0–4.9 ms** | **14.2 / 7.9–9.8 ms** |
|
||
| — definition pipelined behind that codeAction | 5.15 ms | **7.6 / 3.4–7.6 ms** | **14.7 / 11.4–16.2 ms** |
|
||
| `codeAction`, `prim_lc_sync` (42), lazy | 17.3 / 7.2–8.6 ms | **18.1 / 7.4–9.4 ms** | **7.0 / 6.0–6.2 ms** |
|
||
| `didOpen aes.sv` (326 L) → the request behind it | *not measured* | **11.3 / 4.3–11.4 ms** | **5.1 / 3.5–3.7 ms** |
|
||
| `organize imports` resolve at `aes_sbox_canright_masked.sv` 42:2 | *no such action* | *no such action* | **9.6 / 9.6–9.6 ms** |
|
||
| `textDocument/completion` at 0 typed characters (512 items) | 9.5 / 2.3–2.8 ms | **7.8 / 4.2–5.4 ms** | **7.2 / 4.2–5.3 ms** |
|
||
| `textDocument/completion` at `aes` (512 items) | 10.4 / 7.8–9.2 ms | **8.6 / 6.8–7.4 ms** | **9.1 / 7.0–8.2 ms** |
|
||
| `codeAction` on a **comment line** (contrast), lazy | 1.69 / 0.66–0.81 ms | **2.2 / 1.1–1.3 ms** | **4.7 / 3.2–3.8 ms** |
|
||
| `textDocument/references` on `.clk_i` (12 hits) | 0.56 / 0.51–0.72 ms | **1.54 / 0.70–0.81 ms** | **1.65 / 1.01–1.15 ms** |
|
||
| `textDocument/signatureHelp` inside the port list | 0.70 / 0.57–0.62 ms | **2.50 / 1.09–1.24 ms** | **3.06 / 1.12–1.26 ms** |
|
||
| `didChange` flush (`foldingRange` barrier) | 0.95 / 0.58–0.80 ms | **2.32 / 1.04–1.28 ms** | **1.79 / 0.89–0.97 ms** |
|
||
| `textDocument/references` on `aes` (14 hits) | 0.85 / 0.54–0.61 ms | **2.80 / 1.32–1.50 ms** | **0.92 / 0.58–0.60 ms** |
|
||
| `textDocument/completion` after an instance head + `.` (26 items) | *no such answer* | **1.72 / 0.52–0.66 ms (24 items)** | **1.11 / 0.45–0.53 ms (26)** |
|
||
| `textDocument/inlayHint` (whole file, 4 hints) | 0.49 / 0.26–0.43 ms | **1.90 / 0.65–0.85 ms** | **2.04 / 0.57–0.81 ms** |
|
||
| `textDocument/semanticTokens/full` | 0.21 / 0.19–0.25 ms | **1.03 / 0.45–0.57 ms** | **0.39 / 0.23–0.30 ms** |
|
||
| `textDocument/diagnostic` (pull, 0 items — §1b) | 0.34 / 0.17–0.19 ms | **1.02 / 0.46–0.68 ms** | **0.93 / 0.38–0.47 ms** |
|
||
| `textDocument/documentSymbol` | 0.18 / 0.12–0.15 ms | **0.69 / 0.27–0.31 ms** | **0.61 / 0.25–0.31 ms** |
|
||
| `textDocument/prepareRename` on `aes` (pressing F2) | 0.31 / 0.08–0.16 ms | **0.37 / 0.13–0.15 ms** | **0.71 / 0.12–0.91 ms** |
|
||
| — anything queued behind that prepareRename | 0.37 ms | **0.26 / 0.36–0.83 ms** | **0.78 / 0.24–0.63 ms** |
|
||
| `textDocument/definition` on `aes` | 0.19 / 0.07–0.09 ms | **0.87 / 0.11–0.16 ms** | **0.47 / 0.13–0.17 ms** |
|
||
| `textDocument/hover` on `aes` | 0.18 / 0.06–0.08 ms | **0.26 / 0.05–0.08 ms** | **0.86 / 0.15–0.18 ms** |
|
||
| `textDocument/foldingRange` | 0.10 / 0.05–0.07 ms | **0.44 / 0.08–0.10 ms** | **0.73 / 0.12–0.18 ms** |
|
||
| `textDocument/documentHighlight` | 0.10 / 0.04–0.05 ms | **0.19 / 0.07–0.08 ms** | **0.61 / 0.16–0.21 ms** |
|
||
| `textDocument/selectionRange` | 0.09 / 0.05 ms | **0.95 / 0.13–0.28 ms** | **1.79 / 0.17–0.27 ms** |
|
||
| `textDocument/codeLens` | 0.07 / 0.04–0.05 ms | **0.47 / 0.15–0.17 ms** | **0.23 / 0.09–0.10 ms** |
|
||
| `textDocument/typeDefinition` on `aes` | 0.06 / 0.05–0.06 ms | **0.46 / 0.14–0.17 ms** | **0.67 / 0.11–0.17 ms** |
|
||
| `textDocument/documentLink` | 0.06 / 0.04–0.05 ms | **0.49 / 0.13–0.16 ms** | **1.09 / 0.08–0.11 ms** |
|
||
| `initialize` → response | 2.3 – 4.4 ms | **233.5 ms** (a cold `exec`, the session's first spawn) | **0.27 ms** |
|
||
| *transport baseline (does no work)* | *0.06 – 0.24 ms* | *0.04 – 0.17 ms* | *0.09 – 0.63 ms* |
|
||
|
||
**The one-line reading of that table.** Four things moved, and only four:
|
||
|
||
1. **§46's `didOpen` fix is real in the release build, and it is the round's
|
||
headline** — a 42 192-line file's open costs **1 605 ms at 0.43.0 and
|
||
112 ms at 0.49.0**, a **14×**; every RTL file measured is 3–7× cheaper
|
||
(§5c).
|
||
2. **The eager `codeAction` path is ~2× dearer** at every fan-out. It is a
|
||
ruled non-hot path (owner, 2026-09-05), so it is reported, not re-filed —
|
||
but the number crossed 500 ms and §6a says who pays it.
|
||
3. **§49's tail rename buys correctness at 11.3× the cost**: 66 ms answering
|
||
one file and warning about the tail, against 751 ms answering two files
|
||
and editing it (§6c). Filed as §8.3.
|
||
4. **The index costs ~14% more**, on disk and in the server's resident set
|
||
(§6e), which is what `FACTS_FORMAT` 18 → 19 bought.
|
||
|
||
Everything else in the table is inside the machine's noise, and §8.9 says so
|
||
one row at a time. In particular: **the lazy `codeAction` offer, `rename`,
|
||
`completion`, the scan, the diagnostics publish and every sub-millisecond
|
||
navigation request are the same on both binaries.**
|
||
|
||
---
|
||
|
||
## 3. The queue-blocking analysis
|
||
|
||
The server still runs a single-threaded request loop, so the latency a user
|
||
feels for request *R* is *R*'s cost plus everything queued ahead of it. Each
|
||
slow request was sent, then — back to back, no wait — the three requests a
|
||
real editor fires on every cursor move. Three tries; `definition` is the
|
||
first follower.
|
||
|
||
| Sent first (the blocker) | Its own cost, T3 0.43.0 | **0.43.0 tonight** | **0.49.0** | `definition` behind it, **0.43.0** | **0.49.0** |
|
||
|---|---:|---:|---:|---:|---:|
|
||
| `codeAction` on the `aes` token (lazy) | 5.07 ms | **7.55 / 3.35–7.56 ms** | **14.67 / 11.40–16.20 ms** | 3.28 – 7.34 ms | 11.24 – 15.94 ms |
|
||
| `prepareRename` on `aes` | 0.34 ms | **0.26 / 0.36–0.83 ms** | **0.78 / 0.24–0.63 ms** | 0.19 – 0.38 ms | 0.15 – 0.44 ms |
|
||
| `rename` on `aes` | 160.8 ms | **159.3 / 132.9–157.9 ms** | **160.7 / 145.2–161.7 ms** | 132.8 – 159.2 ms | 145.1 – 161.5 ms |
|
||
| `workspace/symbol "aes"` | 11.0 ms | **17.7 / 17.9–18.4 ms** | **18.4 / 15.2–18.0 ms** | 17.1 – 17.3 ms | 14.8 – 17.7 ms |
|
||
|
||
`hover` and `documentSymbol` behind each leader land 0.01–0.3 ms after the
|
||
`definition`, as in all three earlier takes: **the queue is still strictly
|
||
serial and the follower still pays the leader's bill almost exactly.**
|
||
|
||
Take 3's structural conclusion was that "the hot path is clean" — `codeAction`
|
||
5 ms and `completion` 2–3 ms, both inside a 16 ms frame. **That conclusion
|
||
survives, with one qualification.** The lazy `codeAction` on the `aes` token
|
||
is 11.4–16.2 ms at 0.49.0 against 3.4–7.6 at 0.43.0: still under the frame
|
||
budget, but no longer comfortably. The cost is the new offers' own gates —
|
||
`inline_site` and `extract_site` each parse the cursor's buffer — and it is
|
||
paid on every cursor move whether or not anything is offered. §8.2 files it.
|
||
|
||
What is left genuinely slow is unchanged in kind: user-initiated (`rename`,
|
||
160 ms; the tail rename, 751 ms), once-per-session (the scan, 1.2–2.7 s), or
|
||
paid only by a client that cannot resolve a code action (§6a).
|
||
|
||
---
|
||
|
||
## 4. Startup and scan, per scope config and cache state
|
||
|
||
`didOpen tb.sv` → 1.5 s of silence, three runs per cell. "Cold" = the
|
||
`storagePath` directory was `rm -rf`'d immediately before; "warm" = it carries
|
||
a previous run's store.
|
||
|
||
| Scope config | Cache | T3 0.43.0 | **0.43.0 tonight** | **0.49.0** | files |
|
||
|---|---|---:|---:|---:|---|
|
||
| **default** (`[{}]`) | cold | 81.9 / 92.5 / 93.1 ms | **95.0 / 101.7 / 101.6** | **83.8 / 110.3 / 103.6** | 124 |
|
||
| **default** | warm | 39.4 / 40.3 / 41.8 ms | **53.1 / 54.8 / 55.5** | **55.8 / 54.7 / 56.6** | 124, 123 from cache |
|
||
| `{"index":{}}` | cold | 88.8 / 90.1 / 94.5 ms | **96.6 / 91.3 / 103.9** | **98.1 / 95.2 / 103.6** | 124 |
|
||
| `{"index":{}}` | warm | 34.7 / 39.1 / 39.3 ms | **44.6 / 58.4 / 54.2** | **41.8 / 54.8 / 56.4** | 124 |
|
||
| explicit `scopeDepth: 0` | cold | 93.5 / 101.6 / 105.5 ms | **107.4 / 114.8 / 106.1** | **107.4 / 108.8 / 115.8** | 1 (after a ~100 ms 124-file scan is thrown away) |
|
||
| explicit `scopeDepth: 0` | warm | 42.3 / 49.3 / 49.6 ms | **56.6 / 60.4 / 58.9** | **58.8 / 62.3 / 67.9** | 1 |
|
||
| `workspace` | cold | 2 754 / 2 773 / 2 867 ms | **2 645 / 2 640 / 2 656** | **2 712 / 2 691 / 2 712** | 3 976, 3 skipped |
|
||
| `workspace` | warm | 1 220.5 / 1 229.7 / 1 229.8 ms | **1 173.4 / 1 167.1 / 1 173.6** | **1 266.1 / 1 239.8 / 1 285.6** | 3 975 from cache |
|
||
|
||
- **The scan did not change.** Cold workspace is +2.4% at 0.49.0, warm is
|
||
+8.7%; the warm band across both binaries is 1 167–1 286 ms, and 0.43.0's
|
||
own two columns (take 3's 1 220–1 230 and tonight's 1 167–1 174) differ by
|
||
4.5% on their own. §8.9.
|
||
- **Every small-scope cell is 10–40% dearer than take 3's**, on *both*
|
||
binaries, in lockstep. That is the machine (§9), not a release: the 0.43.0
|
||
binary is the same binary take 3 measured.
|
||
- **Persistence still buys ~54%** on the workspace scan (2 676 → 1 218 ms,
|
||
mean of six runs across both binaries) and ~44% on the default scope
|
||
(99.3 → 55.1 ms). Take 3 measured 57% / 57%
|
||
on a quieter machine.
|
||
- **A cold workspace scan is still not fully cold**: the trace is
|
||
`0 files → 124 files → 3 976 files`, and the workspace bar reports "123 from
|
||
cache" even on a wiped store — those 123 are the default scan's own writes,
|
||
read back seconds later. Unchanged from take 3.
|
||
- `initialize` still does no scanning. The one 233 ms reading is the session's
|
||
very first process spawn — a cold `exec`, exactly the outlier take 3 saw.
|
||
|
||
### 4b. What each scope answers, at 0.49.0
|
||
|
||
Take 3's §4b table, re-taken at both binaries. The `aes` instantiation in
|
||
`tb.sv`. **Every count below is identical on 0.43.0 and 0.49.0.**
|
||
|
||
| Request | default | explicit `scopeDepth 0` | workspace |
|
||
|---|---|---|---|
|
||
| `definition` | **1 result**, 0.11–0.21 ms | 0 results | 1 result, 0.22–0.30 ms |
|
||
| `typeDefinition` | 1 result | 0 results | 1 result |
|
||
| `hover` | 1 result | 0 results | 1 result |
|
||
| `references` | **11 results**, 0.44–0.50 ms | 0 results | **14 results**, 1.07–1.14 ms |
|
||
| `documentHighlight` | 1 result | 0 results | 1 result |
|
||
| `signatureHelp` | 0 results | 0 results | 0 results |
|
||
| `workspace/symbol "aes"` | 256, 3.4–4.0 ms | 0 results, 0.09 ms | 256, 9.0–12.3 ms |
|
||
| `inlayHint` (whole file) | **0** | 0 | **4** |
|
||
|
||
Take 3's §4b holds on every row, at both binaries: the counts (1 / 11 / 14 /
|
||
256 / 0-vs-4) are byte-for-byte what take 3 recorded, and §37.2's ruling that
|
||
`inlayHint`'s zero at the default scope is a scope-reach result rather than an
|
||
inlay defect still stands.
|
||
|
||
---
|
||
|
||
## 5. The `didOpen` widen and the `didOpen` delay
|
||
|
||
### 5a. At `scopeDepth 0` — apples to apples with all three earlier takes
|
||
|
||
`tb.sv` open, then RTL files opened one at a time; the request sent
|
||
immediately afterwards waits for the widen. Three tries.
|
||
|
||
| Widening `didOpen` | T3 0.43.0 cold | T3 warm | **0.43.0 cold** | **0.43.0 warm** | **0.49.0 cold** | **0.49.0 warm** |
|
||
|---|---:|---:|---:|---:|---:|---:|
|
||
| `hw/ip/aes/rtl/aes.sv` | 19.3 ms | 18.5 ms | **28.4 / 16.3 / 29.0** | **27.8 / 24.3 / 29.3** | **29.5 / 18.8 / 27.9** | **30.3 / 27.7 / 30.7** |
|
||
| `hw/ip/kmac/rtl/kmac.sv` | 32.9 ms | 25.9 ms | **46.7 / 56.0 / 56.0** | **33.5 / 32.8 / 35.3** | **52.3 / 53.7 / 53.0** | **35.6 / 34.2 / 37.3** |
|
||
| `hw/ip/hmac/rtl/hmac.sv` | 30.4 ms | 20.4 ms | **42.4 / 36.9 / 45.9** | **32.9 / 33.4 / 36.2** | **34.8 / 36.0 / 44.0** | **34.7 / 32.7 / 31.8** |
|
||
| `hw/ip/spi_device/rtl/spi_device.sv` | 85.2 ms | 37.0 ms | **93.5 / 101.9 / 102.0** | **54.7 / 58.0 / 57.5** | **105.4 / 107.5 / 102.1** | **56.9 / 56.0 / 60.0** |
|
||
|
||
`spi_device` is still the ceiling, for the reason take 1 gave. **The two
|
||
binaries are the same on every cell**, and both are 20–50% above take 3's
|
||
0.43.0 column, which is the machine. At this scope each open *is* a rescan, so
|
||
§46 has nothing to remove.
|
||
|
||
### 5b. At the default scope — the widen row, and the three that follow it
|
||
|
||
| Widening `didOpen` | T3 0.43.0 cold | T3 warm | **0.43.0 cold** | **0.43.0 warm** | **0.49.0 cold** | **0.49.0 warm** |
|
||
|---|---:|---:|---:|---:|---:|---:|
|
||
| `aes.sv` (widens `hw/ip/aes` → **`hw/ip`, 1 807 files**) | 1 081.6 ms | 365.1 ms | **1 046.6 / 1 042.0 / 1 019.8** | **344.9 / 340.4 / 338.9** | **1 072.4 / 1 075.8 / 1 051.4** | **367.0 / 351.0 / 378.1** |
|
||
| `kmac.sv` (already in scope) | 24.3 ms | 31.1 ms | **53.4 / 23.9 / 48.5** | **35.3 / 45.0 / 44.7** | **12.7 / 5.5 / 9.6** | **6.6 / 9.5 / 11.6** |
|
||
| `hmac.sv` (already in scope) | 22.6 ms | 21.1 ms | **31.7 / 38.4 / 26.2** | **36.4 / 35.7 / 33.5** | **17.5 / 9.1 / 7.4** | **9.3 / 11.6 / 4.9** |
|
||
| `spi_device.sv` (already in scope) | 47.6 ms | 51.2 ms | **68.8 / 35.3 / 55.8** | **46.5 / 58.2 / 68.9** | **19.9 / 6.2 / 18.0** | **8.5 / 21.0 / 15.4** |
|
||
|
||
**The widen row itself did not move**: 340 ms warm at 0.43.0, 365 ms at
|
||
0.49.0, against take 3's 365 — the same number, three ways. Take 2's
|
||
"1.5-second hang on the most common navigation a Verilog user performs" stays
|
||
closed.
|
||
|
||
**The three rows under it are take 3's §8.4, and they are fixed.** A `didOpen`
|
||
of a file already in scope cost 21–51 ms in take 3 and 33–69 ms here at
|
||
0.43.0; at 0.49.0 it is **5–21 ms**, a 3–5× on every cell. That is §46, and
|
||
§5c measures it properly.
|
||
|
||
### 5c. §46 on the wire, in the release build — the round's headline
|
||
|
||
Take 3 filed the delay (§8.4); 0.44.0 fixed it; the perf README's 2026-09-05
|
||
table was taken with *temporary* timings on a release build. These are the
|
||
release numbers, workspace scope, warm store, `didOpen` → the
|
||
`textDocument/definition` behind it, three tries.
|
||
|
||
| file | lines | perf README "before" | **0.43.0, tonight** | perf README "after" | **0.49.0, tonight** | factor |
|
||
|---|---:|---|---:|---|---:|---:|
|
||
| `aes.sv` | 326 | 8.1 / 5.9 / 10.1 ms | **11.3 / 4.3 / 11.4** | 4.3 / 1.8 / 2.3 ms | **5.1 / 3.5 / 3.7** | ~2× |
|
||
| `aes_core.sv` | 1 145 | 56.2 / 54.0 / 48.0 ms | **42.6 / 63.0 / 63.1** | 5.9 / 6.9 / 6.3 ms | **11.0 / 4.0 / 10.4** | **7×** |
|
||
| `spi_device.sv` | 1 985 | 94.2 / 103.4 / 88.6 ms | **98.7 / 75.2 / 99.5** | 6.0 / 8.6 / 8.7 ms | **15.5 / 13.8 / 15.1** | **6×** |
|
||
| `pinmux_reg_top.sv` | 42 192 | 1 742 / 1 740 / 1 757 ms | **1 605 / 1 604 / 1 611** | 116.5 / 116.2 / 117.3 ms | **112.1 / 127.9 / 130.7** | **13×** |
|
||
|
||
The release build **confirms the fix at the same magnitude the temporary
|
||
timings reported**, and the largest file in opentitan opens in a tenth of a
|
||
frame-budget-heavy second rather than in a second and a half. The absolute
|
||
values here run 1.3–2× above the perf README's on the small files and are
|
||
level on the large one, which is the expected shape when the machine is
|
||
busier: a 4 ms row is mostly floor, a 1 600 ms row is mostly work.
|
||
|
||
**The same cost was paid on every keystroke flush**, not just on opens
|
||
(`docs/features/didopen-cost/`), so this is a typing-latency fix as much as a
|
||
navigation one. That is the strongest single result in this document.
|
||
|
||
---
|
||
|
||
## 6. `codeAction`, refactorings, rename and the index
|
||
|
||
### 6a. Cost against the module's fan-out — the eager path doubled
|
||
|
||
Workspace scope, warm cache, cursor on a module instantiation, four tries
|
||
each. "Lazy" is a client that advertises
|
||
`textDocument.codeAction.resolveSupport.properties: ["edit"]` (what VS Code
|
||
sends); "eager" is a client that does not. Fan-outs re-derived with take 3's
|
||
`grep -rlE '^\s*<module>( |#|$)' --include='*.sv'` and **identical to take 2's
|
||
and take 3's** (1 / 6 / 42 / 67 / 128).
|
||
|
||
| Module at the cursor | files | T3 0.43 eager | **0.43 eager** | **0.49 eager** | T3 0.43 lazy | **0.43 lazy** | **0.49 lazy** | actions at 0.49 |
|
||
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
||
| `aes_reg_top` (in `aes.sv` 103:0) | 1 | 27.7 / 16.3–21.8 | **36.2 / 16.0–22.6** | **30.6 / 22.8–24.2** | 27.1 / 16.4–20.6 | **17.6 / 14.2–15.2** | **29.8 / 21.8–23.5** | **2** |
|
||
| `aes` (in `tb.sv` 44:2) | 6 | 66.1 / 45.7–48.2 | **61.5 / 43.5–46.1** | **114.0 / 88.3–90.7** | 5.15 / 4.05–4.24 | **7.4 / 4.0–4.9** | **14.2 / 7.9–9.8** | **1** |
|
||
| `prim_lc_sync` (in `aes.sv` 118:2) | 42 | 148.0 / 128.9–130.4 | **138.6 / 121.5–124.9** | **270.0 / 254.7–255.7** | 17.3 / 7.2–8.6 | **18.1 / 7.4–9.4** | **7.0 / 6.0–6.2** | **1** |
|
||
| `prim_alert_sender` (in `aes.sv` 235:4) | 67 | 213.4 / 196.0–196.5 | **211.5 / 183.0–192.4** | **405.1 / 362.3–368.8** | 14.8 / 8.6–10.8 | **14.7 / 8.5–12.2** | **13.2 / 9.0–11.5** | **1** |
|
||
| `prim_flop_2sync` (in `aon_timer.sv` 83:2) | 128 | 270.2 / 252.9–255.2 | **267.1 / 238.6–243.3** | **511.8 / 467.1–473.6** | 24.0 / 15.6–16.9 | **16.7 / 10.5–13.2** | **15.0 / 8.1–10.5** | **2** |
|
||
| *(contrast) a comment line* | — | 1.80 / 0.71–0.78 | **2.41 / 1.33–1.58** | **7.44 / 4.34–4.95** | 1.69 / 0.66–0.81 | **2.17 / 1.12–1.32** | **4.70 / 3.18–3.84** | **0** |
|
||
| **`aes` in `aes_wrap.sv` 78:2 — the offering cursor** | 6 | 143.8 / 123.9–124.4 | **145.6 / 115.4–118.6** | **167.9 / 159.9–160.9** | 33.3 / 21.2–26.8 | **20.8 / 18.9–20.2** | **28.6 / 23.6–24.4** | **2** |
|
||
|
||
Two readings, in opposite directions.
|
||
|
||
**The lazy offer is still `O(1)` in the fan-out and is unchanged where it
|
||
matters.** 6.0 ms at 42 files, 9.0 at 67, 8.1 at 128 — flat, and slightly
|
||
*better* than 0.43.0 at the two largest fan-outs. Take 2's "reads as a hang"
|
||
line at 200 ms is nowhere near crossed for a resolving client.
|
||
|
||
**The eager path is 1.95–2.07× dearer at every fan-out above 1**: 46 → 90 ms
|
||
at 6 files, 125 → 255 at 42, 192 → 368 at 67, 243 → 473 at 128. A consistent
|
||
factor across four fan-out points, on the same night, on the same machine,
|
||
with the `--verbose` server's own clock agreeing to 0.5 ms (§0). **The eager
|
||
`codeAction` path is a ruled non-hot path (owner, 2026-09-05), so this is
|
||
reported and not re-filed** — but the number is now half a second at the
|
||
largest fan-out, and §6b shows the eager client also computes strictly more
|
||
offers than it used to.
|
||
|
||
**The two small-cursor rows moved the wrong way for a lazy client too**, and
|
||
this one *is* filed (§8.2): the `aes` cursor is 4.0–4.9 → 7.9–9.8 ms and a
|
||
plain comment line is 1.1–1.3 → 3.2–3.8 ms. Nothing is offered at a comment
|
||
line on either binary; the extra 2 ms is the new offers' gates asking, on
|
||
every cursor move.
|
||
|
||
### 6b. What is offered now, and how often — the census re-taken
|
||
|
||
Take 3 swept every instantiation-shaped line in **205 RTL files** — all 165 of
|
||
`hw/ip/prim/rtl` and all 40 of `hw/ip/aes/rtl` — and found **exactly one
|
||
position offering a port refactoring**. Take 4 re-ran that sweep at 0.49.0
|
||
over the same 205 files, adding `import` lines, and classified every offer.
|
||
**2 440 positions:**
|
||
|
||
| Offer | positions offering it | where |
|
||
|---|---:|---|
|
||
| `lucisv: extract selection into module…` (§53.1) | **2 171** (89%) | nearly everywhere a whole module item starts |
|
||
| ``lucisv: inline `M` here`` (§53.2) | **263** (11%) | every instantiation whose buffer parses clean |
|
||
| `lucisv: organize imports (removes 1, sorts 1)` (§52) | **12** | 2 files: `aes_sbox_canright_masked{,_noreuse}.sv` |
|
||
| `lucisv: connect N missing ports` (§37/ports) | **1** | `hw/ip/aes/rtl/aes_wrap.sv` 0-based 78:2 — take 3's cursor, unmoved |
|
||
| `lucisv: expand .* (N connections)` (§50) | **0** | no `.*` in these 205 files (8 files corpus-wide have one) |
|
||
| `lucisv: remove port …` | **0** | refuses when the module's body uses the port — real RTL always does |
|
||
|
||
**Take 3's §8.7 — "the lightbulb is almost never lit" — is no longer true, and
|
||
that is the mechanism behind §6a's eager number.** At 0.43.0 a cursor on an
|
||
instantiation offered nothing at all on this corpus except at one position; at
|
||
0.49.0 it offers one or two things almost everywhere. Both new offers are
|
||
cheap by construction — `extract` and `inline` carry a `Command`, not an edit,
|
||
so neither reads the workspace at offer time — but each has a *gate* that
|
||
parses the cursor's buffer, and that gate runs on every `codeAction`.
|
||
|
||
**There is no `convert to ANSI` (§51) site on this corpus.** A scan of all
|
||
**1 311 module headers** in opentitan's `hw/` (3 932 `.sv`/`.v` files) found
|
||
**zero** non-ANSI headers — every one declares its ports in the header. So
|
||
that row below measures an ANSI header, where the action is correctly not
|
||
offered, and §51's cost on this corpus is exactly the cost of saying no.
|
||
|
||
*Traceability note (lead, after QA).* The header scan was a one-off census,
|
||
not a harness phase, so it has no log: a line-anchored `module NAME` match
|
||
over every `.sv`/`.v` under `hw/`, comments stripped, the port list checked
|
||
for a direction keyword. QA re-derived it independently: 1 310 headers, two
|
||
apparent non-ANSI hits that are `module NAME #(…);` with **no** port list at
|
||
all, net zero genuine non-ANSI headers. Read "1 311" as "all of them"; the
|
||
one-header difference is the two scans' treatment of a macro-wrapped header.
|
||
|
||
### 6c. The five new offer sites, offer and resolve
|
||
|
||
Lazy client, workspace scope, warm cache, four tries. Each row names a real
|
||
opentitan position, 0-based.
|
||
|
||
| Site | file, position | actions offered | **offer, 0.49.0** | **resolve, 0.49.0** | **0.43.0 offer** |
|
||
|---|---|---:|---:|---:|---:|
|
||
| **expand `.*`** — `sha3 #(…) u_sha3 ( .* );` | `hw/ip/kmac/fpv/tb/sha3_fpv.sv` 54:4 | 2 (`expand .* (32 connections)`, `extract`) | **8.2 / 6.2–7.3 ms** | **67.8 / 66.9–67.0 ms**, 1 file | 0 actions, 2.1 / 1.7–1.8 ms |
|
||
| **organize imports** — 2 imports, 1 unused | `hw/ip/aes/rtl/aes_sbox_canright_masked.sv` 42:2 | 2 (`organize imports (removes 1, sorts 1)`, `extract`) | **30.1 / 13.8–19.5 ms** | **9.6 / 9.6–9.6 ms**, 1 file | 0 actions, 18.5 / 12.7–15.1 ms |
|
||
| **inline module** — a separate-file instance with named connections | `hw/ip/aes/rtl/aes_wrap.sv` 66:2 (`tlul_cmd_intg_gen u_…`) | 2 (``inline `tlul_cmd_intg_gen` here``, `extract`) | **31.7 / 13.9–19.5 ms** | **0.05 / 0.03–0.04 ms** (a `Command`) | 0 actions, 27.1 / 10.8–16.7 ms |
|
||
| **extract module** — a 3-item selection | `hw/ip/aes/rtl/aes.sv` 220:0–222:53 (three status `assign`s) | 1 (`extract selection into module…`) | **8.0 / 3.7–5.0 ms** | **0.19 / 0.08–0.13 ms** (a `Command`) | 0 actions, 20.1 / 5.3–7.4 ms |
|
||
| **port actions** — take 3's cursor | `hw/ip/aes/rtl/aes_wrap.sv` 78:2 | 2 (`connect 2 missing ports`, `extract`) | **28.6 / 23.6–24.4 ms** | **163.9 / 158.2–159.5 ms**, 1 file | 1 action, 20.8 / 18.9–20.2 ms |
|
||
| **convert to ANSI** — *no site exists* (§6b); an ANSI header instead | `hw/ip/aes/rtl/aes.sv` 8:0 (`module aes`) | 0 | **2.8 / 2.2–2.4 ms** | *n/a* | 0 actions, 5.2 / 3.5–3.9 ms |
|
||
|
||
Three things worth stating plainly:
|
||
|
||
- **`inline` and `extract` cost nothing to *pick*** — 0.05 and 0.19 ms —
|
||
because the action carries a `workspace/executeCommand`, not an edit. The
|
||
work happens when the command runs, which this round does not measure
|
||
(running it would edit the corpus). The design is deliberate and is
|
||
documented in `crates/lucisv_server/src/inline_module.rs`'s own header.
|
||
- **`organize imports` is the opposite shape**: the offer computes the whole
|
||
edit (30 / 14–19 ms, because judging it means reading the package closure),
|
||
and the resolve is a cheap re-run at 9.6 ms.
|
||
- **`expand .*` is `O(connections)` on resolve**: 68 ms for 32 connections,
|
||
against an 8 ms offer. That is the right split.
|
||
|
||
**The port-actions resolve is 1.44× dearer at 0.49.0** (110 → 159 ms) at the
|
||
one cursor on this corpus that offers it, and the eager one-shot is 1.36×
|
||
(117 → 160 ms). Filed with §8.2.
|
||
|
||
### 6d. `prepareRename`, `rename`, and §49's hierarchical tail
|
||
|
||
`prepareRename` remains flat and free — 0.12–0.91 ms at 0.49.0, 0.13–0.15 at
|
||
0.43.0 — with the byte-identical answer take 2 pinned
|
||
(`{"placeholder":"aes","range":{"start":{"line":44,"character":2},"end":{"line":44,"character":5}}}`).
|
||
|
||
`rename` on `aes` is **165.1 / 133.5–139.4 ms at 0.49.0** against
|
||
**159.8 / 133.2–136.2 at 0.43.0**, both editing **9 files** — flat, and level
|
||
with take 3's 151.8 / 139.1–140.7.
|
||
|
||
**The tail rename is the round's one large regression, and it is a regression
|
||
that buys a correctness fix.** §49 gave a module a second, *hierarchical*
|
||
member surface — its nets, variables and instances, not only its ports — so a
|
||
rename can follow `u_x.sig` across a file boundary.
|
||
|
||
| | **0.43.0** | **0.49.0** |
|
||
|---|---:|---:|
|
||
| `rename` `state_q` at `hw/ip/entropy_src/rtl/entropy_src_main_sm.sv` 41:19 | **88.0 / 65.8–66.7 ms** | **793.2 / 750.7–751.9 ms** |
|
||
| files edited | **1** (`entropy_src_main_sm.sv`) | **2** (+ `entropy_src_core.sv`) |
|
||
| the tail `u_entropy_src_main_sm.state_q` | **not edited**, warned about | **edited** |
|
||
|
||
**11.3× for one extra edited file.** The rename is user-initiated and rare, so
|
||
this is a low-severity finding — but it is 0.75 s of a frozen single-threaded
|
||
queue on a keystroke-shaped gesture (F2, type, Enter), and everything queued
|
||
behind it pays the same. Filed as §8.3.
|
||
|
||
**Two tails on this corpus do *not* resolve**, and both are worth recording so
|
||
nobody re-derives them as bugs:
|
||
|
||
- `hw/top_earlgrey/ip_autogen/pwrmgr/rtl/pwrmgr.sv` 178:10,
|
||
`u_fsm.state_q` — inside a `` ` ``-macro assertion argument. The rename
|
||
edits `pwrmgr_fsm.sv` alone.
|
||
- `hw/top_earlgrey/ip_autogen/pinmux/rtl/pinmux.sv` 687:40, `u_reg.intg_err` —
|
||
likewise not edited, and `completion` after `u_reg.` there returns 0 items.
|
||
|
||
§49's own README rules a *generate-block-scoped* tail an honest refusal; these
|
||
two are a different shape and are filed as §8.5 for a future round to classify.
|
||
|
||
### 6e. `completion`, the instance-head tail, `moduleHierarchy`, the index
|
||
|
||
**`completion` did not move.** Every prefix is within 0.6 ms of 0.43.0 and
|
||
every one returns the same item count:
|
||
|
||
| Typed prefix | items | **0.43.0** | **0.49.0** | T3 0.43.0 |
|
||
|---|---:|---:|---:|---:|
|
||
| `` (empty) | 512 | 7.8 / 4.2–5.4 ms | **7.2 / 4.2–5.3 ms** | 9.5 / 2.3–2.8 |
|
||
| `a` | 512 | 4.4 / 3.1–3.3 | **4.5 / 3.1–3.3** | 3.2 / 2.5–2.7 |
|
||
| `ae` | 512 | 3.5 / 2.6–2.7 | **3.6 / 2.7–2.9** | 4.0 / 2.6–2.9 |
|
||
| `aes` | 512 | 8.6 / 6.8–7.4 | **9.1 / 7.0–8.2** | 10.4 / 7.8–9.2 |
|
||
| `aes_` | 512 | 6.8 / 6.2–6.4 | **7.1 / 6.7–6.9** | 7.5 / 6.8–8.2 |
|
||
| `prim_` | 512 | 4.2 / 3.4–3.6 | **4.1 / 3.6–3.8** | 5.1 / 4.0–4.4 |
|
||
| `clk` | 512 | 3.9 / 3.3–3.3 | **4.2 / 3.3–3.5** | 4.4 / 3.3–3.9 |
|
||
| `aes_reg` | 512 | 3.2 / 2.6–2.8 | **3.3 / 2.7–2.9** | 3.8 / 2.9–3.0 |
|
||
| `zzzz` | 1 | 1.2 / 0.29–0.31 | **1.2 / 0.31–0.35** | 1.4 / 0.31–0.34 |
|
||
|
||
**Completion after an instance head and a `.`** — §49's other surface, at
|
||
`hw/ip/entropy_src/rtl/entropy_src_core.sv` 3091:29
|
||
(`u_entropy_src_main_sm.`):
|
||
|
||
| | **0.43.0** | **0.49.0** |
|
||
|---|---:|---:|
|
||
| round trip | 1.72 / 0.52–0.66 ms | **1.11 / 0.45–0.53 ms** |
|
||
| items | **24** | **26** |
|
||
|
||
**Two more members for no time at all** — the hierarchical surface arrives
|
||
free on this path, which is the shape §49 wanted and the opposite of the
|
||
rename row above.
|
||
|
||
**`lucisv/moduleHierarchy`** — the flat snapshot the VS Code DUT sidebar
|
||
consumes (`params: {}`; the sections are client-side and not measured here):
|
||
|
||
| | **0.43.0** | **0.49.0** |
|
||
|---|---:|---:|
|
||
| round trip | 70.3 / 41.0–48.8 ms | **76.2 / 41.1–53.8 ms** |
|
||
| payload | 2 600 051 B | **2 600 051 B** — byte-identical |
|
||
| content | 1 546 modules over 1 529 files, `schemaVersion` 2 | same |
|
||
|
||
Unchanged, and the payload is 2.6 MB — the compaction its own module
|
||
documents (11.6 MB → 1.9 MB) is holding. It is sent on demand, not on every
|
||
save, so 40–76 ms is a fair price; it is also the single largest message this
|
||
server writes, and it blocks the queue for that whole time (§3's rule).
|
||
|
||
**The index's size, on disk and resident.** `FACTS_FORMAT` 18 → 19 added the
|
||
hierarchical member table and the re-export group:
|
||
|
||
| | **0.43.0** | **0.49.0** | change |
|
||
|---|---:|---:|---:|
|
||
| index store on disk, after a workspace scan | **39 940 KB** (39.0 MB) | **45 404 KB** (44.3 MB) | **+13.7%** |
|
||
| server RSS after a **cold** workspace scan (3 tries) | 479 520 / 483 056 / 481 936 KB | **544 800 / 539 392 / 542 736 KB** | **+12.6%** |
|
||
| server RSS after a **warm** workspace scan (3 tries) | 512 544 / 512 400 / 501 872 KB | **581 072 / 588 608 / 587 264 KB** | **+15.1%** |
|
||
|
||
**+13.7% on disk and +12.6/+15.1% resident, which is a proportionate price** for what §49 and §48
|
||
bought — a 3 976-file design costs the editor 530–590 MB resident and 44 MB on
|
||
disk. Worth a glance next round rather than a finding: the disk and the
|
||
resident set moved by the same fraction, so this is the index growing, not a
|
||
leak. Also worth knowing: **a warm scan holds more than a cold one on both
|
||
binaries** — 27 MB more at 0.43.0, 42 MB more at 0.49.0 — because the store
|
||
is read into memory as well as built.
|
||
|
||
---
|
||
|
||
## 7. The CLI sweeps
|
||
|
||
`format --check` and `check` over five trees, three binaries, three tries each,
|
||
wall clock and peak RSS from `/usr/bin/time -l`, everything under
|
||
`tools/guard.sh`. The formatter cache lives in a scratch `--cache-dir` outside
|
||
the corpus. File counts: `hw/ip` 1 807, `hw/top_earlgrey/ip` 46,
|
||
`hw/top_darjeeling/ip` 49, `hw/dv` 365, `hw/vendor` 287 — unchanged from
|
||
take 3.
|
||
|
||
| Tree | command | **0.49.0** | **0.43.0** | 0.39.0 | peak RSS, 0.49 → 0.43 → 0.39 (MB) |
|
||
|---|---|---:|---:|---:|---:|
|
||
| `hw/ip` | `format --check`, cold cache | 0.60 / 0.64–0.67 | 0.64 / 0.60–0.64 | 0.60 / 0.60–0.62 | 216 → 237 → 238 |
|
||
| `hw/ip` | `format --check`, warm cache | 0.60 / 0.62–0.63 | 0.58 / 0.60–0.63 | 0.63 / 0.56–0.57 | 217 → 214 → 228 |
|
||
| `hw/ip` | `check` (default rules) | 0.37 / 0.38–0.40 | 0.41 / 0.38–0.41 | 0.34 / 0.35 | 190 → 176 → 186 |
|
||
| `hw/ip` | `check --select error,warning,style` | **0.57 / 0.58–0.60** | 0.45 / 0.44–0.47 | 0.40 / 0.40–0.41 | 212 → 175 → 190 |
|
||
| `hw/top_earlgrey/ip` | `format --check`, cold / warm | 0.04 / 0.04 | 0.04 / 0.04 | 0.03 / 0.04 | 34 → 32 → 31 |
|
||
| `hw/top_earlgrey/ip` | `check` / `--select …` | 0.03 / 0.04 | 0.02 / 0.03 | 0.03 / 0.03 | 33 → 38 → 30 |
|
||
| `hw/top_darjeeling/ip` | `format --check`, cold / warm | 0.04 / 0.03 | 0.03 / 0.03 | 0.03 / 0.03 | 22 → 22 → 24 |
|
||
| `hw/top_darjeeling/ip` | `check` / `--select …` | 0.02 / 0.03 | 0.02 / 0.02 | 0.02 / 0.03 | 27 → 27 → 26 |
|
||
| `hw/dv` | `format --check`, cold / warm | 0.07 / 0.07 | 0.07 / 0.07 | 0.06 / 0.06 | 27 → 27 → 29 |
|
||
| `hw/dv` | `check` / `--select …` | 0.05 / 0.08 | 0.06 / 0.07 | 0.05 / 0.06 | 30 → 33 → 31 |
|
||
| `hw/vendor` | `format --check`, cold / warm | 0.10 / 0.10 | 0.12 / 0.09 | 0.10 / 0.10 | 45 → 44 → 44 |
|
||
| `hw/vendor` | `check` / `--select …` | 0.08 / 0.11 | 0.08 / 0.09 | 0.07 / 0.09 | 53 → 50 → 48 |
|
||
|
||
- **`format --check` did not move at all.** Every cell on every tree is inside
|
||
the three binaries' own spread. The biggest tree, 1 807 files, is checked
|
||
for formatting in 0.6 s on ten cores at ~220 MB, exactly as in take 3.
|
||
- **`check --select error,warning,style` is 1.27× slower than 0.43.0 on
|
||
`hw/ip`** (0.45 → 0.57 s), 1.22× on `hw/vendor` (0.09 → 0.11) and 1.14× on
|
||
`hw/dv` (0.07 → 0.08). **Most of this is more work, not slower work**:
|
||
0.49.0 runs the new `unused-import` rule (0.48.0, §52's shared judgement)
|
||
and finds 17 more violations on `hw/ip`. §8.4 files what is left.
|
||
- **`check` with default rules did *not* slow down** (0.41 → 0.37 s on
|
||
`hw/ip`), which is the same reading from the other side: `unused-import` is
|
||
Style and off by default, so the default rule set is untouched. Take 3's
|
||
§8.5 ("`check` is 6–10% slower than 0.39.0") therefore **stops
|
||
accumulating** on the default path: 0.34–0.35 s at 0.39.0, 0.38–0.41 at
|
||
0.43.0, 0.37–0.40 at 0.49.0.
|
||
- **The formatter cache still buys nothing on opentitan**, and for the reason
|
||
take 3 gave: it remembers already-formatted files, and opentitan has 30 of
|
||
1 807 in `hw/ip`, 3 of 365 in `hw/dv`, 12 of 287 in `hw/vendor`. The cold
|
||
and warm rows are within noise everywhere.
|
||
- **Peak RSS scales with the tree, not the version.** 22–53 MB for the four
|
||
small trees, 175–238 MB for `hw/ip`; no version is consistently above
|
||
another and the ordering flips between rows, so nothing is claimed.
|
||
|
||
### 7a. Failure counts, and every per-file outcome that changed
|
||
|
||
`format --check --no-cache`, `check` and `check --select error,warning,style`,
|
||
full runs, all three binaries, paths made relative and sorted so two runs
|
||
differ only where an *outcome* did.
|
||
|
||
| Tree | 0.39.0 `format --check` | 0.43.0 | **0.49.0** |
|
||
|---|---|---|---|
|
||
| `hw/ip` | 1773 would reformat, 30 unchanged, 4 failed | 1772, 30, 4 | **1772, 30, 4** |
|
||
| `hw/top_earlgrey/ip` | 46 would reformat | 46 | **46** |
|
||
| `hw/top_darjeeling/ip` | 48 would reformat, 1 failed | 48, 1 | **48, 1** |
|
||
| `hw/dv` | 361, 3 unchanged, 1 failed | 362, 3, 0 | **362, 3, 0** |
|
||
| `hw/vendor` | 270, 12 unchanged, 5 failed | 271, 12, 4 | **271, 12, 4** |
|
||
|
||
**`format --check --no-cache` is byte-identical between 0.43.0 and 0.49.0 on
|
||
all five trees** — not one per-file verdict changed, and not one parse error
|
||
appeared or disappeared. §54's grammar additions (`randsequence`, `->>`,
|
||
casts, drive strengths, `let`, clocking skews) were the expected candidates;
|
||
**none of them changes an outcome on this corpus**, because none of those
|
||
shapes appears in a file that lucisv did not already handle. §38's fixes stay
|
||
fixed.
|
||
|
||
**`check` with default rules is byte-identical too** — `hw/ip` 445,
|
||
`hw/top_earlgrey/ip` 14, `hw/top_darjeeling/ip` 23, `hw/dv` 85, `hw/vendor`
|
||
231 + 1 file that cannot be checked, at both 0.43.0 and 0.49.0.
|
||
|
||
**`check --select error,warning,style` changed in exactly one way: 20 new
|
||
`unused-import` findings, and nothing else.**
|
||
|
||
| Tree | 0.43.0 | **0.49.0** | delta |
|
||
|---|---:|---:|---:|
|
||
| `hw/ip` | 7 734 | **7 751** | +17 |
|
||
| `hw/top_earlgrey/ip` | 551 | **553** | +2 |
|
||
| `hw/top_darjeeling/ip` | 382 | **383** | +1 |
|
||
| `hw/dv` | 1 158 | **1 158** | 0 |
|
||
| `hw/vendor` | 1 666 | **1 666** | 0 |
|
||
|
||
Every one of the 20 is a line of the form
|
||
``<file>:<line>:<col>: style: `pkg::*` is imported but nothing in this scope
|
||
uses it [unused-import]``, and **no violation disappeared**. `unused-import`
|
||
is the rule 0.48.0 added out of organize-imports' judgement (CHANGELOG 0.48.0:
|
||
"Style, off by default, safe fix"), which is why the default rule set is
|
||
untouched. **The outcome diff is fully explained; there is no unexplained
|
||
change on any tree, for any command, at any rule set.**
|
||
|
||
The files that still fail to parse, unchanged from take 3 apart from the two
|
||
0.42/0.43 fixes it recorded:
|
||
`hw/ip/edn/dv/env/edn_env_cfg.sv`, `hw/ip/kmac/fpv/tb/keccak_2share_fpv.sv`,
|
||
`hw/ip/kmac/pre_dv/kmac_reduced_tb/rtl/kmac_reduced_tb.sv`,
|
||
`hw/ip/spi_device/dv/env/spi_device_scoreboard.sv`,
|
||
`hw/top_darjeeling/ip/ast/rtl/ast.sv` (a locally modified file),
|
||
`hw/vendor/lowrisc_ibex/dv/formal/check/peek/compare_helper.sv`,
|
||
`hw/vendor/lowrisc_ibex/dv/uvm/core_ibex/riscv_dv_extension/riscv_core_setting.tpl.sv`
|
||
(a template, not SystemVerilog),
|
||
`hw/vendor/lowrisc_ibex/syn/rtl/latch_map.v`,
|
||
`hw/vendor/lowrisc_ibex/vendor/google_riscv-dv/src/riscv_instr_cover_group.sv`.
|
||
|
||
---
|
||
|
||
## 8. Findings — filed, not fixed
|
||
|
||
Ordered by how much they matter. Nothing here was fixed in this round.
|
||
|
||
### 8.1 CREDIT, not a finding — what got faster
|
||
|
||
Stated first so the rest reads in proportion.
|
||
|
||
| What | 0.43.0 | **0.49.0** | Credit |
|
||
|---|---:|---:|---|
|
||
| `didOpen` of opentitan's largest file → the next request | 1 605 / 1 604–1 611 ms | **112 / 128–131 ms** | **§46** (0.44.0) — **14×** |
|
||
| `didOpen spi_device.sv` → the next request | 98.7 / 75.2–99.5 ms | **15.5 / 13.8–15.1 ms** | **§46** — 6× |
|
||
| `didOpen aes_core.sv` → the next request | 42.6 / 63.0–63.1 ms | **11.0 / 4.0–10.4 ms** | **§46** — 7× |
|
||
| A `didOpen` of a file already in scope, default scope (take 3's §8.4) | 33–69 ms | **5–21 ms** | **§46** — 3–5×; **take 3's §8.4 is closed** |
|
||
| `rename` through an instance tail | 1 file, tail unedited | **2 files, tail edited** | **§49** — correctness, at a cost (§8.3) |
|
||
| `completion` after an instance head + `.` | 24 items, 1.72 / 0.52–0.66 ms | **26 items, 1.11 / 0.45–0.53 ms** | **§49** — free |
|
||
| `codeAction` lazy offer at 42 files | 18.1 / 7.4–9.4 ms | **7.0 / 6.0–6.2 ms** | unattributed; §37.1's shape holding |
|
||
|
||
**§46 closes take 3's §8.4 outright**, and it is the largest improvement any
|
||
of the four rounds has measured on a per-keystroke path.
|
||
|
||
### 8.2 FINDING (medium) — the lazy `codeAction` offer costs 2–3 ms more at every cursor, offered or not
|
||
|
||
**What.** For a resolving client — the majority since 0.41.0, and what VS Code
|
||
sends — `textDocument/codeAction` costs 2–5 ms more at 0.49.0 than at 0.43.0
|
||
at the *small* cursors, including cursors where nothing is offered:
|
||
|
||
| cursor | 0.43.0 repeats | **0.49.0 repeats** | factor |
|
||
|---|---:|---:|---:|
|
||
| a plain comment line (0 actions on both) | 1.12 – 1.32 ms | **3.18 – 3.84 ms** | **2.9×** |
|
||
| `aes` in `tb.sv` (1 action at 0.49, 0 at 0.43) | 4.0 – 4.9 ms | **7.9 – 9.8 ms** | 2.0× |
|
||
| `aes_reg_top` in `aes.sv` (2 actions at 0.49, 0 at 0.43) | 14.2 – 15.2 ms | **21.8 – 23.5 ms** | 1.5× |
|
||
| pipelined `definition` behind the `aes` codeAction (§3) | 3.3 – 7.3 ms | **11.2 – 15.9 ms** | 2.2× |
|
||
|
||
**Why it matters.** `codeAction` fires on every cursor move, and every request
|
||
behind it in the serial queue pays its bill (§3). At 0.43.0 a cursor move cost
|
||
the queue 3–7 ms; at 0.49.0 it costs 11–16 ms. Still inside a 16 ms frame, but
|
||
the margin is gone, and this is a request the user never asked for.
|
||
|
||
**The mechanism, as far as this round can see it without bisecting.** The
|
||
comment-line row is the cleanest evidence: **zero** actions are offered on
|
||
either binary, so the extra 2 ms is not the cost of producing an offer. It is
|
||
the cost of the new offers' *gates* — `vlog_refactor::inline_site` and
|
||
`extract_site` each run a tolerant parse of the cursor's buffer
|
||
(`crates/vlog_refactor/src/inline/mod.rs:73`,
|
||
`crates/lucisv_server/src/inline_module.rs:50`) — asked on every cursor move.
|
||
Not bisected; candidates are §52, §53.1 and §53.2, which are the three that
|
||
added a gate.
|
||
|
||
**Reproduce.** `bench.py codeaction`, then read the `comment line, lazy` rows
|
||
for the two labels; or `bench.py probe --probe hw/ip/aes/dv/tb/tb.sv:43:2`.
|
||
Workspace scope, warm store, `tb.sv` open, four tries. The `--verbose`
|
||
server's own line agrees with the wire to 0.5 ms (§0), so this is server work.
|
||
|
||
**A cheap direction, if a future round wants one:** the two gates parse the
|
||
same buffer the server already has parsed for diagnostics and symbols. Take 3
|
||
made the same observation about the port offer, and §37.1's answer — do not
|
||
compute what nobody asked for — is the shape that worked.
|
||
|
||
### 8.2b REPORTED, not filed — the eager `codeAction` path is ~2× dearer
|
||
|
||
The eager path (a client without
|
||
`codeAction.resolveSupport.properties: ["edit"]` — Vim/Neovim setups and
|
||
simple clients) is **1.95–2.07× slower at 0.49.0 than 0.43.0** at every
|
||
fan-out above 1: 46 → 90 ms at 6 files, 125 → 255 at 42, 192 → 368 at 67,
|
||
243 → 473 at 128 (§6a). Take 3 filed the earlier 1.37× step as its §8.2; **the
|
||
owner ruled the eager path a non-hot path on 2026-09-05**, so take 4 reports
|
||
the number and does not re-file it. Two facts for whoever reads it next: it
|
||
now crosses half a second at the largest fan-out, and the resolve at the one
|
||
offering cursor moved with it (110 → 159 ms, §6c), which the *lazy* client
|
||
pays too — but only on a click.
|
||
|
||
### 8.3 FINDING (low–medium) — §49's tail rename is 11× a same-file rename
|
||
|
||
**What.** Renaming a variable that a hierarchical tail names from another file
|
||
costs **793.2 / 750.7–751.9 ms at 0.49.0** against **88.0 / 65.8–66.7 ms at
|
||
0.43.0**, for one extra edited file.
|
||
|
||
**Reproduce.** `bench.py tailrename`. `textDocument/rename` on `state_q` at
|
||
`hw/ip/entropy_src/rtl/entropy_src_main_sm.sv` 0-based 41:19, newName
|
||
anything, workspace scope, warm store, with
|
||
`hw/ip/entropy_src/rtl/entropy_src_core.sv` also open. 0.43.0 returns 1 file
|
||
and warns about the tail; 0.49.0 returns 2 files and edits it. The edits are
|
||
discarded.
|
||
|
||
**Why it is filed and not credited.** The correctness is unambiguously right —
|
||
§49's whole point is that the old answer handed back a design that no longer
|
||
elaborates — and a rename is user-initiated and rare. But 0.75 s freezes the
|
||
single-threaded queue for three quarters of a second on an F2-shaped gesture,
|
||
and everything behind it waits (§3). Compare the ordinary `rename` on `aes`,
|
||
which edits **nine** files in 133–139 ms: the tail rename edits **two** in
|
||
751 ms, so this is not "more files", it is a different and much more expensive
|
||
lookup. `completion` on the same surface is *free* (§6e), which suggests the
|
||
cost is in rename's reference walk rather than in the surface itself.
|
||
|
||
**Not bisected.** The candidate is §49's hierarchical member walk in
|
||
`workspace/record.rs` / `resolve.rs::head_surface`.
|
||
|
||
### 8.4 FINDING (low) — `check --select error,warning,style` is 1.27× slower, beyond the new rule's own work
|
||
|
||
`hw/ip`: 0.45 → 0.57 s (mean of three); `hw/vendor` 0.09 → 0.11;
|
||
`hw/dv` 0.07 → 0.08. 0.49.0 does find 20 more violations (§7a), all from
|
||
0.48.0's `unused-import`, so **some** of this is honest extra work — but 20
|
||
extra findings across 2 554 files is not obviously 120 ms of work on `hw/ip`,
|
||
and `check` with the *default* rules did not move at all (0.41 → 0.37 s), so
|
||
the whole difference sits in the Style class. Take 3's §8.5 asked whether its
|
||
6–10% would keep accumulating; on the default path the answer is **no**, and
|
||
on the Style path it is **yes, once, when a rule was added**. Not bisected.
|
||
120 ms on the largest tree in opentitan is not a user-visible cost; filed so
|
||
the next round can see whether adding the *next* Style rule costs the same
|
||
again.
|
||
|
||
**Reproduce.** `tools/perf/sweep.sh <binary> <label> <opentitan> <outdir> 3`,
|
||
then `sweeptable.py <outdir>`; read the `hw/ip` / `check --select …` row.
|
||
|
||
### 8.5 FINDING (low) — two hierarchical tails on this corpus do not resolve
|
||
|
||
`hw/top_earlgrey/ip_autogen/pwrmgr/rtl/pwrmgr.sv` 178:10 (`u_fsm.state_q`,
|
||
inside a `` ` ``-macro assertion argument) and
|
||
`hw/top_earlgrey/ip_autogen/pinmux/rtl/pinmux.sv` 687:40 (`u_reg.intg_err`)
|
||
are both instance-head tails whose head is instantiated in the same file and
|
||
whose target is declared in another. Neither is edited by a rename at
|
||
0.49.0, and `completion` after `u_reg.` at the second returns **0 items**.
|
||
§49's README rules a *generate-block-scoped* tail an honest refusal and pins
|
||
it with a test; neither of these is that shape. This is filed as a question,
|
||
not an assertion of a defect: a future round (or §49's author) should say
|
||
which of the two rules applies, so the refusal is documented rather than
|
||
observed.
|
||
|
||
**Reproduce.** `bench.py probe` is for `codeAction`; for these, issue
|
||
`textDocument/rename` at the declaration
|
||
(`pwrmgr_fsm.sv` 109:28 for the first) with both files open at workspace
|
||
scope, and read the edit set.
|
||
|
||
### 8.6 WATCH — the index is 14% bigger, on disk and resident
|
||
|
||
39.0 → 44.3 MB on disk, 482 → 542 MB resident cold (+12.6%), 509 → 586 MB warm (+15.1%) (§6e).
|
||
Proportionate to what `FACTS_FORMAT` 18 → 19 added and consistent across the
|
||
two measures, so not a leak. Recorded because half a gigabyte is what an
|
||
editor session on this design now holds, and because a fifth round should see
|
||
whether the next format bump costs another 14%.
|
||
|
||
### 8.7 STILL SLOW — the cold workspace scan at ~2.7 s
|
||
|
||
2 640–2 712 ms across both binaries, essentially unmoved across four takes
|
||
(3 003 → 2 958 → 2 767 → 2 676 mean) and still the largest absolute number in
|
||
the document. Once per session per cold cache; never any round's target.
|
||
|
||
### 8.8 CLOSED — take 3's findings, one by one
|
||
|
||
| Take 3 finding | Status at 0.49.0 |
|
||
|---|---|
|
||
| §8.2 eager `codeAction` 1.37× slower than take 2 | **Superseded.** Another 1.95–2.07× on top, but the path was ruled non-hot; reported as §8.2b |
|
||
| §8.3 `rename` ~1.4× slower in absolute terms | **Still true, still flat.** 133–139 ms at both binaries, 9 files, ~15 ms per edited file |
|
||
| §8.4 `didOpen` of an in-scope file delays the next request 21–51 ms | **CLOSED — fixed by §46**, measured in the release build at §5c |
|
||
| §8.5 `check` 6–10% slower than 0.39.0 | **Partly closed.** Default rules stopped accumulating (§7); the Style class took one more step when a rule was added (§8.4) |
|
||
| §8.6 `workspace/symbol` keeps drifting up | **Not readable this round.** 8.7–12.7 ms at 0.49.0 and 8.2–13.3 at 0.43.0 — the two binaries' bands overlap almost entirely, and both are above take 3's 7.2–7.9 on a busier machine. No conclusion |
|
||
| §8.7 the port refactorings are offered at 1 of 205 RTL files | **Still 1 of 205 for the *port* refactorings** — the same `aes_wrap.sv` 78:2. But §6b's census now finds `extract` at 89% of positions and `inline` at 11%, so "the lightbulb is almost never lit" is no longer the corpus's shape |
|
||
| §8.8 the cold workspace scan at ~2.8 s | **Unchanged.** §8.7 above |
|
||
|
||
### 8.9 Movements inside the noise, listed and dismissed
|
||
|
||
Every sub-millisecond navigation row: `definition` (0.87 → 0.47 first),
|
||
`hover` (0.26 → 0.86), `typeDefinition` (0.46 → 0.67), `documentHighlight`
|
||
(0.19 → 0.61), `foldingRange` (0.44 → 0.73), `codeLens` (0.47 → 0.23),
|
||
`documentLink` (0.49 → 1.09), `selectionRange` (0.95 → 1.79),
|
||
`semanticTokens/full` (1.03 → 0.39), `documentSymbol` (0.69 → 0.61),
|
||
`diagnostic` (1.02 → 0.93), `prepareRename` (0.37 → 0.71), the `didChange`
|
||
flush (2.32 → 1.79), `inlayHint` (1.90 → 2.04), `references` on `aes`
|
||
(2.80 → 0.92) and on `.clk_i` (1.54 → 1.65), `signatureHelp` (2.49 → 3.06),
|
||
`workspace/symbol` (both bands overlapping), the diagnostics publish
|
||
(164.0 → 164.5), and every `scan` cell.
|
||
|
||
**Every one of these sits on a transport floor that measured 0.04–0.17 ms on
|
||
one binary and 0.09–0.63 ms on the other, minutes apart, on the same machine
|
||
(§0).** They move in both directions with no pattern, their result counts are
|
||
identical on both binaries (§4b), and take 3 measured the *same* 0.43.0 binary
|
||
at a third set of values. **No conclusion should be drawn from any of them.**
|
||
|
||
---
|
||
|
||
## 9. Methodology and caveats — read before quoting any number
|
||
|
||
Take 1's, take 2's and take 3's caveats still apply. The take-4-specific ones:
|
||
|
||
- **Three tries per row, first try and repeat range both reported.** "First"
|
||
is the request issued as the first real request of a dedicated session,
|
||
after the scan settled; "repeats" is the 2nd–4th identical request in that
|
||
same session. Where a row needed its own session (`codeAction`, `rename`,
|
||
the tail rename, each fan-out cursor, each scope/cache cell, each widen
|
||
cell) it got one — and where a phase is a once-per-session event (the scan,
|
||
the widen, the `didOpen` delay, RSS) each try is a **fresh server process**.
|
||
- **The comparison is binary-to-binary, on one night, with one client.**
|
||
0.49.0 is the tree's own `target/release/lucisv-server` at `4c2dae3`,
|
||
verified current against the last change under `crates/` — **no `cargo
|
||
build` ran for it**. 0.43.0 was built for this round from the `v0.43.0` tag
|
||
in a scratch `git worktree` under the scratchpad, and the worktree was
|
||
removed before this document was finished. The main tree was never checked
|
||
out, reset or stashed.
|
||
- **Machine state, and it is the biggest caveat in this document.** Apple M1
|
||
Max, 10 cores, 64 GB, macOS 27.0 (26A5425a). **This machine runs a live
|
||
desktop session**, and throughout the round WindowServer sat at 45–51% of a
|
||
core, loginwindow at 24–29%, with a wallpaper extension and two consumer
|
||
apps at 8–11% each. **Load average was 3.7–7.1** for every phase; take 3
|
||
measured at 2–4. Nothing unrelated to the desktop was burning CPU — no
|
||
`rustc`, no build, no other agent — so the round proceeded rather than
|
||
waiting, and the mitigation is structural: **both binaries were measured in
|
||
the same window, alternating within the hour, with the same client.** Every
|
||
comparison in §2–§7 is 0.49.0 against tonight's 0.43.0; take 3's column is
|
||
context, never a conclusion. The load average was recorded before and after
|
||
every phase.
|
||
- **No `cargo` command ran in any tree while a timed measurement was
|
||
running.** The one `cargo build` (the 0.43.0 worktree) finished 20 minutes
|
||
before the first timed run.
|
||
- **The guard.** Every server session, every `lucisv` invocation and the one
|
||
`cargo build` went through `tools/guard.sh -m 8 -t 1800`. **No guard kill
|
||
occurred**, and the largest resident set anything reached was 588 MB
|
||
(`lucisv-server` after a warm workspace scan), 7% of the 8 GB limit; the
|
||
largest a CLI run reached was 238 MB.
|
||
- **The opentitan checkout was never written.**
|
||
`git -C /Users/guoliangchen/repo/opentitan status --porcelain` was checked
|
||
after every phase and reported the same three pre-existing modified files
|
||
throughout: `hw/ip/aes/dv/tb/tb.sv`,
|
||
`hw/top_darjeeling/ip/ast/rtl/ast.sv`, `hw/top_earlgrey/ip/ast/rtl/ast.sv`.
|
||
`rename`, `codeAction/resolve` and the refactoring resolves all return
|
||
edits; the client discarded every one. The formatter cache was directed to a
|
||
scratch `--cache-dir` and the index cache to a scratch
|
||
`initializationOptions.storagePath`; neither default lands inside the corpus,
|
||
and both were overridden anyway.
|
||
- **Tolerances.** Sub-millisecond rows: **±0.5 ms**, and nothing under that is
|
||
read (§0 measured a 0.04→0.63 ms floor swing between two sessions of the
|
||
same client). Rows of 1–20 ms: **±20%**. Rows of 20–500 ms: **±10%**.
|
||
Multi-second rows: **±5%** (the six warm workspace scans span 118 ms across
|
||
two binaries, 10%; the six cold ones span 72 ms, 2.7%). Take 3's tolerances
|
||
were tighter on every band because its machine was quieter; a number here
|
||
that differs from take 3's by less than these bands has not moved.
|
||
- **Item and result counts are reported beside every timing** where the answer
|
||
could have changed size, and every one of them is identical on the two
|
||
binaries except the two the document names (`completion` after an instance
|
||
head: 24 → 26 items; the tail rename: 1 → 2 files).
|
||
- **The fan-out counts in §6a are `grep`-derived**
|
||
(`grep -rlE '^\s*<module>( |#|$)'` over `*.sv`), reproducing take 2's and
|
||
take 3's counts exactly (1 / 6 / 42 / 67 / 128).
|
||
- **The offer sites in §6b/§6c were found, not chosen.** Every position was
|
||
discovered by sweeping `codeAction` over candidate lines and keeping what
|
||
actually offered; the two sites this document reports as *not* offering
|
||
(§8.5) are the two candidates that failed, kept rather than dropped.
|
||
- **`--select error,warning,style` is not "all rules"** — it is the three rule
|
||
classes by name, which is what §58 asked for.
|
||
- **Page cache is hot and hotter than ever** — opentitan has now been walked
|
||
by four measurement rounds plus tonight's outcome sweeps. "Cold cache"
|
||
means *lucisv's* store was deleted, not that the OS file cache was dropped.
|
||
- **No code in the lucisv repo was modified for this round** except the
|
||
creation of `tools/perf/`, this file,
|
||
`docs/features/performance-take4/README.md`, the `docs/perf/README.md`
|
||
entry and §58's ticks in `TODO.md`. No Rust source was touched.
|
||
|
||
---
|
||
|
||
## 10. Raw logs, and where the harness lives
|
||
|
||
**The harness is committed**: `tools/perf/` — `lspclient.py`, `sites.py`,
|
||
`harness.py`, `bench.py`, `phases_new.py`, `sweep.sh`, `sweeptable.py`,
|
||
`outcomes.sh`, `README.md`. Python 3 standard library only; runs from a clean
|
||
checkout given an opentitan path and the binaries. `tools/perf/README.md` says
|
||
how to run each phase. **Take 5 reuses it rather than reimplementing it from
|
||
this document's prose.**
|
||
|
||
The Python was split after the measurements were taken (`bench.py` had reached
|
||
537 production lines), so **every phase was re-run through the split files and
|
||
ten rows re-checked against this document within §9's tolerances** — all
|
||
inside. That verification run is in the raw logs as `verify.jsonl`, labelled
|
||
`verify-0.49.0`; the feature README lists the ten rows and both readings.
|
||
|
||
The raw measurements are under
|
||
`…/7b09ba01-…/scratchpad/`, and `results.jsonl` is additionally copied to
|
||
`~/.cache/lucisv-perf/take4/results.jsonl` so it survives the scratchpad.
|
||
|
||
| File | What |
|
||
|---|---|
|
||
| `verify.jsonl` | the post-split re-run of every phase, label `verify-0.49.0` (§10 above) |
|
||
| `results.jsonl` | every LSP row, machine-readable: `phase`, `label`, `row`, `ms` (try list), `n`, `titles`, `note`. **Every LSP number in this document is in this file.** Copy at `~/.cache/lucisv-perf/take4/` |
|
||
| `logs/lsp-0.49.0.log`, `logs/lsp-0.43.0.log` | the phase transcripts, in order |
|
||
| `logs/lsp-0.49.0-machine.txt`, `logs/lsp-0.43.0-machine.txt` | `uptime` and the top CPU processes, before and after the LSP phases |
|
||
| `logs/sweep-machine.txt`, `logs/outcomes-load-{before,after}.txt` | the same for the CLI phases |
|
||
| `sweep/<label>__<tree>__<command>__<cache>.txt` | §7 — the three tries' `/usr/bin/time -l` blocks per cell, 60 files |
|
||
| `logs/sweeptable.txt` | §7's rendered table and the summary line each cell reported |
|
||
| `outcomes/<label>.{format,check,check-select}.txt` | §7a — the per-file outcome listings for all three binaries; the diff in §7a is `diff outcomes/0.43.0.* outcomes/0.49.0.*` |
|
||
| `logs/census-0.49.0.txt` | §6b — the 205-file, 2 440-position offer census |
|
||
| `caches/` | the scratch `storagePath` stores and the scratch formatter `--cache-dir`; nothing here is inside the corpus |
|