Skip to content

Optimize TDS cursor hot paths - #304

Draft
Saurabh Singh (saurabh500) wants to merge 1 commit into
saurabh500-experimental-tds-perf-baselinefrom
dev/saurabh500/tds-cursor-hot-path
Draft

Optimize TDS cursor hot paths#304
Saurabh Singh (saurabh500) wants to merge 1 commit into
saurabh500-experimental-tds-perf-baselinefrom
dev/saurabh500/tds-cursor-hot-path

Conversation

@saurabh500

Copy link
Copy Markdown
Contributor

Description

Layer 2 of a separate experimental performance stack.

Removes the per-column read_row_column info span and avoids reading the monotonic clock in the cursor row/column paths when no request timeout is active. Explicit timeout budgets, including Duration::ZERO, retain the existing accounting behavior.

This preserves strict row-at-a-time and column-at-a-time cursor semantics. It does not batch, prefetch, or materialize whole rows.

Stack parent: #303

Measurement context

In the strict-streaming ODBC prototype, removing per-column instrumentation moved throughput from about 435K to 577K rows/s. Adding timeout clock gating later raised the combined prototype to about 624K rows/s. These are combined experimental measurements, not isolated claims for this PR alone.

Related Issues

Related to #303.

Validation

  • cargo fmt --all -- --check
  • cargo nextest run -p mssql-tds --lib request_timeout_clock --no-fail-fast
  • cargo nextest run -p mssql-tds --lib read_row_column --no-fail-fast
  • cargo clippy -p mssql-tds --frozen --all-features --all-targets -- -D warnings

Checklist

  • Formatting passes
  • Clippy passes with warnings denied
  • Focused tests pass
  • Strict per-row/per-column streaming is preserved

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@saurabh500
Saurabh Singh (saurabh500) changed the base branch from main to saurabh500-experimental-tds-perf-baseline August 15, 2026 17:54
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