Optimize TDS cursor hot paths - #304
Draft
Saurabh Singh (saurabh500) wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Saurabh Singh (saurabh500)
changed the base branch from
main
to
saurabh500-experimental-tds-perf-baseline
August 15, 2026 17:54
This was referenced Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Layer 2 of a separate experimental performance stack.
Removes the per-column
read_row_columninfo span and avoids reading the monotonic clock in the cursor row/column paths when no request timeout is active. Explicit timeout budgets, includingDuration::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 -- --checkcargo nextest run -p mssql-tds --lib request_timeout_clock --no-fail-fastcargo nextest run -p mssql-tds --lib read_row_column --no-fail-fastcargo clippy -p mssql-tds --frozen --all-features --all-targets -- -D warningsChecklist