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
Copy file name to clipboardExpand all lines: doc/docs/15-roadmap.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,8 +76,8 @@ The header-filtered sibling parsing optimization (see Optimization section) beco
76
76
|**Disk snapshot strategy (operational)**
77
77
|The `.cx` file functions as a startup snapshot. At startup, the server loads the snapshot into the file table and skips CUs whose disk mtime matches the stored mtime. On `-exit`, the server saves the current in-memory state back to disk. No prior `-create` needed — the first session builds references from scratch, subsequent sessions load the snapshot. See below for target semantics.
78
78
79
-
|**Search reads from in-memory table**
80
-
|`OP_SEARCH` currently bypasses the in-memory `referenceableItemTable` entirely — `scanForSearch()` reads directly from disk `.cx` files. Once memory is truth, search should query the in-memory table with the same pattern matching (`shellMatch`, substring fitness). No new infrastructure needed — the data is already there after entry refresh. Depends on the references refresh module being in place so the in-memory table is reliably complete.
79
+
|**Search reads from in-memory table (done)**
80
+
|`OP_SEARCH` now queries the in-memory `referenceableItemTable` via `searchInMemoryTable()` in cxref.c, replacing the disk-based `scanForSearch()`. Same matching logic (`searchSymbolCheckReference`, `searchStringMatch`), same reference filtering (`UsageDefined`/`UsageDeclared`), same result printing. Skips `VisibilityLocal` (block-local) symbols, matching the snapshot's write filter. This was the last operation that read from disk `.cx` files as truth — **all operations now use the in-memory table**.
81
81
82
82
|**Snapshot write triggers (partially done)**
83
83
|The `-exit` handler calls `markPreloadedFilesAsAncient()` + `saveReferences()`. The Emacs client sends `-exit` via `kill-emacs-hook` on quit, and `c-xref-kill-xref-process` sends `-exit` before killing (project change gets save for free). Two of three triggers are operational:
@@ -104,7 +104,7 @@ The path forward is:
104
104
1. **Lightweight scanning replaces `-create`** (done) — discover CUs and include structure without full parsing. Populate the same `TypeCppInclude` references.
105
105
2. **Snapshot save/load** (done) — `.cx` loaded at startup, saved on `-exit`. No manual `-create` needed after first session.
106
106
3. **Refactoring moves into server (strangler fig)** (done) — all refactorings run as server operations via `OP_REFACTORY`. Legacy `-refactory` path remains for fallback; Emacs menu toggle enables battle-testing. Final cleanup: remove `RefactoryMode`, `callXref`, `parseBufferUsingServer` bridge.
107
-
4. **`.cx` becomes startup snapshot only** — never consulted during operation. The in-memory table is authoritative. Search reads from memory. This is the current focus.
107
+
4. **`.cx` becomes startup snapshot only** (done) — never consulted during operation. The in-memory table is authoritative. Search reads from memory. All operations now use the in-memory `referenceableItemTable`. The disk scan tables in `cxfile.c` (all except `snapshotLoadScanDispatchTable`) are candidates for removal.
0 commit comments