Skip to content

perf: speed up ontology and Explorer loading - #103

Merged
dcolthorp merged 4 commits into
mainfrom
t3/ontology-query-performance
Nov 6, 2026
Merged

dcolthorp merged 4 commits into
mainfrom
t3/ontology-query-performance

Conversation

@dcolthorp

@dcolthorp dcolthorp commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Ontology navigation repeated an expensive component layout, while Explorer downloaded the detailed graph to draw a folder overview. Summaries also hydrated full node lists to return counts and five examples.

Cache Atlas geometry and run component packing in a worker with a synchronous fallback. Stream canonical summary rows, count note totals in SQL, avoid weighted-edge aggregation for endpoint discovery, and give Explorer a compact file-pair response. Existing layout, count, folder and freshness rules are preserved. No index or schema migration is needed; Explorer still builds the full cached graph on the server.

Measurements

Same-input local replays against the previous implementation:

Workload Before After
Atlas cold layout CPU, median of 3 1,246.5 ms 670.6 ms
Atlas geometry cache hit full layout 0.06 ms
Type summaries, median of 7 44.3 ms 6.7 ms
Explorer response, before compression 6.15 MB 2.66 MB

All replayed positions, connector paths, summary counts and examples matched. The Explorer projection took 3.2 ms in one warm measurement. These are component measurements, not whole-page latency claims.

Verification

All applicable CI checks passed on final head b8fbc6a963ce24260a7f59f24fd1c5e19eafa8aa; the reviewed branch is current with main.

  • NODE_OPTIONS=--no-experimental-webstorage mise exec -- make check: passed, including 1,983 web tests.
  • NODE_OPTIONS=--no-experimental-webstorage mise exec -- make build: passed.
  • NODE_OPTIONS=--no-experimental-webstorage mise exec -- make check-full: passed, including race tests, benchmark contracts and integrations, before the UI-only rebase (Go source unchanged).
  • NODE_OPTIONS=--no-experimental-webstorage mise exec -- make web-e2e: all 124 passed.
  • ./scripts/rzm validate and ./scripts/rzm validate frozen-scope-drift: zero findings.
  • Built-browser comparison: exact baseline geometry, successful packing-worker response, and no second worker after navigating away and back. Explorer request and visual behavior verified.

Greptile: 5/5, zero comments on final head b8fbc6a963ce24260a7f59f24fd1c5e19eafa8aa. Its initial readiness finding was withdrawn after checking the unchanged base inventory contract and regression test.

Reviewed with sol-loop: 3 rounds with GPT-6.1 Sol on high reasoning effort. Sol verdict: approved. The final pre-merge pass scored 9/10, found no remaining blocker or should-fix, and ran 60 web tests plus focused Go checks. Reviewer usage was not exposed.

Council review

Rounds: 2. Only two providers were available. Round 1 found a worker startup bug and missing fallback; both were fixed and verified before round 2.

Delegate Round 1 Round 2
Claude Opus 5.5 5/10 9/10
GPT-6.1 Sol 9/10 9/10

Created with GPT-6.1 Sol in the Codex harness through T3 Code.

@dcolthorp
dcolthorp force-pushed the t3/ontology-query-performance branch from bca59a1 to b8fbc6a Compare November 6, 2026 13:43
@dcolthorp
dcolthorp merged commit aa8d5d3 into main Nov 6, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant