Skip to content

perf: 3.9.6 broad build regression — native +81% build, +60% query; both engines impacted #1037

@carlos-alm

Description

@carlos-alm

Summary

generated/benchmarks/BUILD-BENCHMARKS.md @ 28b1dd7 shows 3.9.6 regressed across both engines on full-build per-file cost and on native query latency.

This issue covers full-build regressions visible in BUILD-BENCHMARKS.md. #1036 covers the incremental-build regression visible in INCREMENTAL-BENCHMARKS.md — separate concern, separate data file.

Per-file full-build regression (3.9.4 → 3.9.6)

Engine 3.9.4 3.9.6 Δ
native 3.2 ms/file 5.8 ms/file +81%
wasm 16.3 ms/file 28.3 ms/file +74%

File count grew (668 → 744 native, 728 → 742 wasm), but the metric is already per-file, so growth alone doesn't explain it.

Query latency regression

Engine 3.9.4 3.9.6 Δ
native 29.4 ms 47 ms +60%
wasm 44.1 ms 42.8 ms ~

Native query latency jumped 60% while WASM stayed flat. Per-query breakdown also regressed on native: fn-deps 2.5 → 3.4 (+36%), fn-impact 2.5 → 3.1 (+24%), path 2.4 → 3.1 (+29%). The native roles query did not regress (37 → 39 ms), so it's likely not the queries themselves but something earlier in the read path or in per-call setup.

Output sizes (sanity check)

Nodes/file dropped 25.6 → 24 (-6%) and edges/file 53.8 → 50 (-7%) on native, so the engine is producing fewer nodes and edges yet taking longer per file. The slowdown is not explained by extra work being captured.

Disagreement with #1036 numbers

#1036 reports native full-build went 2.1s → 3.0s (3.22 → 4.01 ms/file, +24%) and frames native as not regressing proportionally. BUILD-BENCHMARKS.md reports native 4.3s on 744 files → 5.78 ms/file (+81%). The two measurements disagree by ~50%. Possibly different machines / cold vs warm runs / different commits — but at minimum the BUILD-BENCHMARKS.md numbers contradict the "native didn't regress proportionally" claim. Worth reconciling which dataset is canonical.

Likely culprit area

Three commits between 3.9.4 and 3.9.6 to bisect:

A native +60% query regression with no AST changes is unusual; worth checking whether DB schema, index, or initialization paths shifted.

Acceptance criteria

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions