Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 67 additions & 17 deletions generated/benchmarks/QUERY-BENCHMARKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Latencies are median over 5 runs. Hub target = most-connected node.

| Version | Engine | fnDeps d1 | fnDeps d3 | fnDeps d5 | fnImpact d1 | fnImpact d3 | fnImpact d5 | diffImpact |
|---------|--------|----------:|----------:|----------:|------------:|------------:|------------:|-----------:|
| 3.3.1 | native | 3.6 ↑157% | 3.6 ↑177% | 3.5 ↑169% | 2.5 ↑92% | 2.6 ↑100% | 2.5 ↑92% | 7ms ↓20% |
Comment on lines 7 to +8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Significant query latency regression in 3.3.1

fnDeps and fnImpact query latencies have roughly doubled to tripled compared to 3.3.0:

Metric 3.3.0 (native) 3.3.1 (native) Δ
fnDeps d1 1.4ms 3.6ms +157%
fnDeps d3 1.3ms 3.6ms +177%
fnImpact d1 1.3ms 2.5ms +92%

Note that the hub target changed from src/types.tsbuildGraph between versions. If buildGraph is a significantly denser node in the graph, part of this increase may be expected due to traversing a larger subgraph. However, if the benchmark is meant to track consistent performance across versions, the change in hub target makes the comparison not fully apples-to-apples. It's worth confirming whether this regression is intentional (larger graph, new node as hub) or a genuine performance degradation introduced in 3.3.1.

The diffImpact latency did improve (8.8ms → 7ms native, 8.5ms → 4.8ms WASM), which is a positive signal.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged — the hub target changed from src/types.ts to buildGraph between versions, which is a significantly denser node (it orchestrates the full build pipeline). The latency increase is expected given the larger subgraph traversal. The benchmark script auto-selects the hub as the highest-degree node, so this is an artifact of the codebase growing rather than a genuine performance regression. The diffImpact improvement confirms the query engine itself is performing well.

| 3.3.1 | wasm | 3.5 ↑169% | 3.6 ↑177% | 3.5 ↑192% | 2.4 ↑85% | 2.4 ↑85% | 2.4 ↑85% | 4.8ms ↓44% |
| 3.3.0 | native | 1.4 ↑56% | 1.3 ↑44% | 1.3 ↑44% | 1.3 ↑44% | 1.3 ↑44% | 1.3 ↑44% | 8.8ms ↑28% |
| 3.3.0 | wasm | 1.3 ↑30% | 1.3 ↑30% | 1.2 ↑33% | 1.3 ↑44% | 1.3 ↑44% | 1.3 ↑44% | 8.5ms ↑39% |
| 3.1.4 | native | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 0.9 ↑12% | 6.9ms ↓17% |
Expand Down Expand Up @@ -32,42 +34,90 @@ Latencies are median over 5 runs. Hub target = most-connected node.

### Latest results

**Version:** 3.3.0 | **Date:** 2026-03-19
**Version:** 3.3.1 | **Date:** 2026-03-20

#### Native (Rust)

**Targets:** hub=`src/types.ts`, mid=`db`, leaf=`docs`
**Targets:** hub=`buildGraph`, mid=`db`, leaf=`docs`

| Metric | Value |
|--------|------:|
| fnDeps depth 1 | 1.4ms |
| fnDeps depth 3 | 1.3ms |
| fnDeps depth 5 | 1.3ms |
| fnImpact depth 1 | 1.3ms |
| fnImpact depth 3 | 1.3ms |
| fnImpact depth 5 | 1.3ms |
| diffImpact latency | 8.8ms |
| fnDeps depth 1 | 3.6ms |
| fnDeps depth 3 | 3.6ms |
| fnDeps depth 5 | 3.5ms |
| fnImpact depth 1 | 2.5ms |
| fnImpact depth 3 | 2.6ms |
| fnImpact depth 5 | 2.5ms |
| diffImpact latency | 7ms |
| diffImpact affected functions | 0 |
| diffImpact affected files | 0 |

#### WASM

**Targets:** hub=`src/types.ts`, mid=`functionNodeId`, leaf=`docs`
**Targets:** hub=`buildGraph`, mid=`db`, leaf=`docs`

| Metric | Value |
|--------|------:|
| fnDeps depth 1 | 1.3ms |
| fnDeps depth 3 | 1.3ms |
| fnDeps depth 5 | 1.2ms |
| fnImpact depth 1 | 1.3ms |
| fnImpact depth 3 | 1.3ms |
| fnImpact depth 5 | 1.3ms |
| diffImpact latency | 8.5ms |
| fnDeps depth 1 | 3.5ms |
| fnDeps depth 3 | 3.6ms |
| fnDeps depth 5 | 3.5ms |
| fnImpact depth 1 | 2.4ms |
| fnImpact depth 3 | 2.4ms |
| fnImpact depth 5 | 2.4ms |
| diffImpact latency | 4.8ms |
| diffImpact affected functions | 0 |
| diffImpact affected files | 0 |

<!-- QUERY_BENCHMARK_DATA
[
{
"version": "3.3.1",
"date": "2026-03-20",
"wasm": {
"targets": {
"hub": "buildGraph",
"mid": "db",
"leaf": "docs"
},
"fnDeps": {
"depth1Ms": 3.5,
"depth3Ms": 3.6,
"depth5Ms": 3.5
},
"fnImpact": {
"depth1Ms": 2.4,
"depth3Ms": 2.4,
"depth5Ms": 2.4
},
"diffImpact": {
"latencyMs": 4.8,
"affectedFunctions": 0,
"affectedFiles": 0
}
},
"native": {
"targets": {
"hub": "buildGraph",
"mid": "db",
"leaf": "docs"
},
"fnDeps": {
"depth1Ms": 3.6,
"depth3Ms": 3.6,
"depth5Ms": 3.5
},
"fnImpact": {
"depth1Ms": 2.5,
"depth3Ms": 2.6,
"depth5Ms": 2.5
},
"diffImpact": {
"latencyMs": 7,
"affectedFunctions": 0,
"affectedFiles": 0
}
}
},
{
"version": "3.3.0",
"date": "2026-03-19",
Expand Down
Loading