Release 0.65.11: actions on the open file no longer wait for the workspace
A hover, definition, type definition, highlight, prepare-rename or signature help on a name the file itself declares, and the outline, folding and selection ranges, are answered from the open buffer ahead of a scan, a rescan or a widen (server/ahead.rs, same_file.rs). The precondition is stated once, on Server::answer_from_the_buffer; ahead::REACH lists the notifications proved unable to change a buffer and everything else blocks. Completion offers what the file can reach (imported package members, inherited class members, included headers' macros) right after its own names (completion/related.rs), and its answers are half the size (completion/wire.rs). A new largeFile.threshold re-classifies buffers already open. The client's answer to a settings pull is now ordered like a notification (amends scan-ordering); colours answered while anything is held count as unsettled. TODO 71.2. Four dev rounds, four QA rounds; the last ran with Fable 5.2 as dev and QA after two QA failures. docs/features/fast-actions. Co-Authored-By: Claude Mythos 5.2 <[email protected]>
This commit is contained in:
1 parent
c1c1407498
commit
cc1e2c8b72
44 files changed
+6153
-325
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -105,8 +105,15 @@ Because the decision lives in `set_document`, it is re-taken on every
|
||||
`didOpen`, every `didChange` and every text-carrying `didSave`. A buffer edited
|
||||
past the threshold switches to the fast path at that moment; one edited back
|
||||
under it is analyzed again in full. **A changed `lucisv.largeFile.threshold`
|
||||
therefore takes effect at each buffer's next change, not immediately** — the
|
||||
simplest rule that has no re-analysis storm in it, and the one the tests pin.
|
||||
takes effect on the open buffers at once** (since `fast-actions`, 2026-11-19;
|
||||
before it, at each buffer's next change): the settings applier re-analyzes
|
||||
exactly the open, clean buffers the new value classifies differently
|
||||
(`Server::reclassify_large_buffers`, called by `apply_settings` for the
|
||||
startup's settings answer and every later push), republishes each once and asks
|
||||
a capable client to re-request its colours. An unchanged threshold costs one
|
||||
comparison, a dirty buffer takes the new value at its flush, and like an edit
|
||||
this does not reindex — the index takes the buffer's new mode at its next save
|
||||
or rescan (`docs/features/fast-actions/README.md`, Handshake request 8).
|
||||
|
||||
## The dispatch table
|
||||
|
||||
@@ -324,9 +331,11 @@ rebuilds the buffer (O(file) per batch, and edits in a netlist are rare) and
|
||||
built-in LSP) asks for ranges.
|
||||
- **The buffer's text stays in memory.** 100 MB of `String` is the price of
|
||||
answering anything at all; the editor holds a copy too.
|
||||
- **The threshold is not consulted anywhere but `set_document`.** A setting
|
||||
changed while a buffer is open leaves that buffer in the mode it was built
|
||||
in until its next change.
|
||||
- **The threshold is consulted in `set_document`, and by the settings applier
|
||||
for the buffers already open** (`Workspace::is_large`). A setting changed
|
||||
while a buffer is open moves that buffer to the mode the new value gives it
|
||||
at once, by re-analyzing it through `set_document`
|
||||
(`Server::reclassify_large_buffers`).
|
||||
- **VS Code ≥ 1.134 behaves as the bundle read here says.** The two facts
|
||||
relied on — "complete tokens stop the viewport provider" and "an error is not
|
||||
a complete answer" — have been in VS Code for years, and the range provider
|
||||
|
||||
@@ -53,7 +53,10 @@ fix round for its cost, QA-1).
|
||||
that notification was: it is then answered against newer state, exactly as
|
||||
every request answered late on base was. Exempt altogether: **responses**
|
||||
(they answer a request the server made; `take_the_answer_out_of_held`
|
||||
relies on that) and the navigation requests the empty-answer rule set aside
|
||||
relies on that) — **amended 2026-11-19 by fast-actions (0.65.11):** the
|
||||
client's answer to a settings pull is applied as a settings push is, so
|
||||
outside the startup wait it is ordered like a notification (`must_hold`,
|
||||
`behind`); every other response stays exempt — and the navigation requests the empty-answer rule set aside
|
||||
(`deferred`, re-asked at a later publish). A **cancel** waits whenever
|
||||
anything is held, so one naming a held request is honoured at replay; one
|
||||
naming a request in the unapplied tail of the burst a scan is nested in is
|
||||
@@ -93,7 +96,8 @@ fix round (in particular not `incremental.rs`'s `holds_another_spelling_of`).
|
||||
draining (`Server::behind`, a count of those tails' non-cancel
|
||||
notifications, kept by `process_batch`). A cancel is held when anything
|
||||
is held. A request's rule is `must_wait`, unchanged. A response is never
|
||||
held. `batch::changes_state` names the messages that are ordered.
|
||||
held, except the answer to a settings pull (fast-actions, 0.65.11), which
|
||||
is ordered like a notification. `batch::changes_state` names the messages that are ordered.
|
||||
Anything that adds a new caller of `process_batch` inherits the rule for
|
||||
free; anything that applies a client message *without* going through
|
||||
`process_batch` breaks it. **For lane 71.3 (viewport highlighting),
|
||||
|
||||
@@ -1498,3 +1498,36 @@ index-changing save (only answers taken off an unsettled index are
|
||||
re-checked; unrestricted it was 1.4–2.3 / 12.7–14.2 ms per save). A 60-line
|
||||
`range` on a buffer of 4 000 modules costs 0.30 ms against 0.28 ms for 500 in
|
||||
a debug build (was 98 ms against 11 ms: the old answer built the whole file).
|
||||
|
||||
### 2026-11-19 — fast actions: same file first, completion through the relationship map (lane 71.2)
|
||||
|
||||
Real binary over LSP stdio with VS Code 1.145's client capabilities, against
|
||||
copies of OpenTitan `hw/` replicated 1 / 5 / 10 times (4 061 / 20 305 /
|
||||
40 610 files, unit names prefixed per copy), workspace scope, cold store,
|
||||
the open buffer `aes_cipher_core.sv`. Before = 0.65.10 (`c1c1407`); both
|
||||
binaries run back to back per tree on a shared machine. Medians: 3 runs for
|
||||
held requests, 20 calls settled. Harness and every table in
|
||||
`docs/features/fast-actions/README.md`.
|
||||
|
||||
| held during … (4k / 20k / 40k files) | before | after, a request the buffer answers | after, a cross-file one |
|
||||
|---|---|---|---|
|
||||
| a whole rescan (one watched *create*) | 939 / 4 712 / 9 781 ms | **195 / 1 110 / 2 435 ms** | unchanged |
|
||||
| the startup scan (local hover with the `didOpen`) | 637 / 752 / 908 ms | **2.3 / 1.9 / 2.1 ms** | unchanged |
|
||||
| a widen (folder scope) | 366 / 369 / 363 ms | **0.6 / 0.6 / 0.2 ms** | unchanged |
|
||||
|
||||
(Re-measured in the lane's escalation round: the rescan row's "after" is the
|
||||
harness's own previous step — a delete's one-file update, which drains
|
||||
nothing — and not the rescan. With the server idle when the watcher event
|
||||
arrives a buffer-local request sent 5 ms later takes **38 / 168 / 331 ms**,
|
||||
and 0.1–0.2 ms when it is written together with the event.)
|
||||
|
||||
Settled, nothing the buffer-local requests do scales with the workspace
|
||||
(every one under 1 ms at 40k files, unchanged by this lane). Completion,
|
||||
per answer, at every size: 129–155 KB → **62–84 KB** for a client that takes
|
||||
`itemDefaults` (the range and format said once), server time 1.4–1.6 →
|
||||
0.9–1.2 ms, and the members of the imported package all offered (at
|
||||
`ae`, 40k files: 10 of 34 → 34 of 34). What remains slow and is not this
|
||||
lane's: the rescan itself (whole, for one created file), its first ~0.5–2 s
|
||||
before any drain point, `workspace/symbol` (118 ms for one letter at 40k),
|
||||
the hierarchy snapshot (26 MB, 274 ms at 40k), and a 20k-line buffer's
|
||||
reparse per keystroke (~20–27 ms).
|
||||
Reference in new issue
Block a user