Skip to content

Draft: batch catalog extraction for single-connection performance#188

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/improve-extract-catalog-performance
Draft

Draft: batch catalog extraction for single-connection performance#188
Copilot wants to merge 1 commit intomainfrom
copilot/improve-extract-catalog-performance

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

This work targets the single-connection catalog extraction path, where many small metadata queries add avoidable round trips and latency. The intended change is to keep the extraction code modular while allowing the catalog data to be fetched through one batched SQL execution, with timing coverage to compare both approaches.

  • Performance coverage

    • Add a focused integration test that records extraction time for the current path and the batched path on the same schema setup.
    • Keep the test centered on single-connection extraction so it measures the overhead this issue is concerned with.
  • Catalog extraction path

    • Introduce a batched execution mode for extractCatalog that runs one large SQL request instead of issuing many independent catalog queries.
    • Preserve separation of concerns by keeping object-specific extraction logic split by type and composing the SQL/results in a shared coordinator.
  • Behavioral compatibility

    • Keep the resulting Catalog shape and normalization flow unchanged so downstream diff/planning code continues to consume the same model.
const startedAt = performance.now();
const catalog = await extractCatalog(pool);
const elapsedMs = performance.now() - startedAt;

Note: no repository changes are included yet in the current sandbox session because Bun is not installed, which blocks the required project validation commands before implementation.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 11, 2026

⚠️ No Changeset found

Latest commit: b64f79b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] Improve performance for extract catalog using single SQL query Draft: batch catalog extraction for single-connection performance Apr 11, 2026
Copilot AI requested a review from avallete April 11, 2026 08:15
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.

2 participants