GitNexus/gitnexus/bench
Gergő Magyar 0d1aed942f
docs(bench): close FTS as an optimization target with measured evidence (#3209)
PR #3208 landed two claims that further measurement disproved.

The narrowing is not inconsistent. A true incremental leaf edit rebuilds
exactly 8 of the 20 configured indexes -- the tables the writeback DMLs --
and the 20-index run I compared it against was a forced full rebuild
(runner-identity trap). Per-index costs for those 8 sum to 7769ms against
the 7525ms measured in-analyze. There is nothing to fix in `touchedFts`.

The 845ms was not `import('./platform/capabilities.js')`. The CLI already
imports that module statically; a cached dynamic import measures 0.035ms.
The `await` is the first yield after the native FTS build and absorbs the
libuv work still queued behind it. Recorded as a fourth measurement trap,
since it invalidates any mark placed on an await that follows native work.

What replaces them is a floor, established by probing a copy of the corpus
index directly:

  - narrowing further: nothing left, the 8 tables are exactly the DML'd set
  - concurrent builds: hard error, one write transaction at a time
  - connection thread count: flat at 4/8/16/24 (7298/7133/7109/7345ms
    min-of-3), though the default burns ~60% more CPU for it
  - dropping `content` from File: 3541ms -> 241ms, but that deletes
    full-file keyword search (#2317/#2323); capping is a bad trade because
    the size distribution is flat

The one lever left is overlap: the build runs on a libuv thread and hides
behind main-thread JS (3337ms for the index plus a 3000ms JS burn, against
~6859ms serial). File rows are `{ name, filePath }` from `processStructure`
with content lazy-read at CSV time, so they are known before parsing. What
blocks it is that the DB is closed for the whole pipeline and that an early
write moves `liveIndexMutationStarted` ahead of it.

The `ponytail:` comment in `createSearchFTSIndexes` invited exactly the fix
that cannot work -- every caller has already dropped the indexes it passes,
so a presence gate would never fire. Replaced with the measured reason.

Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-07 19:22:24 +01:00
..
callable-value-flow fix(scope-resolution): parse def coordinates after file paths (#2743) 2026-07-30 07:34:32 +01:00
cfg feat(impact): opt-in PDG-backed impact mode - statement + inter-procedural slicing, resolved-callee-id soundness, mutation-oracle validated (#2227) 2026-06-20 12:04:32 +01:00
cpp-qualified-ns perf(cpp): index qualified namespace members once per pipeline run (#2788) (#2794) 2026-08-02 15:52:33 +01:00
cross-repo-trace fix(group)!: stop group sync claiming matching it never did (#3020) 2026-08-27 18:27:32 +01:00
emit-persistence feat(zig): mark CALLS edges inside comptime-false branches as staticGated (#3161) 2026-09-03 19:49:16 +01:00
finalize-reexport fix(python): resolve calls through __init__.py re-exports (#2864) 2026-08-09 12:21:06 +01:00
impact-pdg fix(impact-pdg): make the Impact PDG Mutation Report workflow pass (3 latent oracle bugs) (#2258) 2026-06-20 20:40:28 +01:00
import-target feat: add Zig language support (#1432) 2026-09-03 13:29:42 +01:00
java-lombok-synthesis feat(jvm): synthesize Lombok and Kotlin JVM accessor methods (#2885) 2026-08-31 17:55:52 +00:00
java-wildcard-route-constants feat(jvm): fold Java static wildcards and Kotlin star imports for route constants (#3110) 2026-08-31 21:58:40 +00:00
kotlin-import-target fix(kotlin): resolve imports from declared packages (#2990) 2026-08-18 20:47:30 -07:00
kotlin-jvm-accessors feat(jvm): synthesize Lombok and Kotlin JVM accessor methods (#2885) 2026-08-31 17:55:52 +00:00
kotlin-star-route-constants feat(jvm): fold Java static wildcards and Kotlin star imports for route constants (#3110) 2026-08-31 21:58:40 +00:00
lib feat(jvm): fold Java static wildcards and Kotlin star imports for route constants (#3110) 2026-08-31 21:58:40 +00:00
parse-dispatch-rounds perf(parse): tighten the dispatch-round memory bound and unclamp the worker-pool override (#3200) 2026-09-07 13:53:31 +01:00
python-scope feat: add Zig language support (#1432) 2026-09-03 13:29:42 +01:00
receiver-resolution feat: add Zig language support (#1432) 2026-09-03 13:29:42 +01:00
schema-pairs fix(scope-resolution): link Record graph nodes (#2871) 2026-08-07 18:33:27 +01:00
scope-capture feat: add Zig language support (#1432) 2026-09-03 13:29:42 +01:00
scope-emission fix(scope-resolution): resolve calls through a closure-valued binding across languages (#2693) (#2695) 2026-07-27 07:52:18 +01:00
spring-conditionals feat(spring): model profiles, conditions, and auto-configuration (#2678) 2026-07-28 07:05:41 +01:00
spring-config-bindings feat(kotlin): bind Spring config consumers on Kotlin sources (#3126) 2026-09-01 10:32:09 +00:00
v8-sidecar perf(store): V8 sidecars plus hardlinked ParsedFile restore (#3099) 2026-08-30 20:50:20 +00:00
zig-cross-file-resolution fix(zig): resolve cross-file static gates (#3185) 2026-09-07 07:19:30 +01:00
analyze-phase-breakdown.md docs(bench): close FTS as an optimization target with measured evidence (#3209) 2026-09-07 19:22:24 +01:00
parse-throughput.md fix(parse): correct worker-pool docs drift + surface worker-side stack on crash (#2068) (#2070) 2026-06-08 07:20:12 +01:00