Skip to content

Avoid redundant array alloc when TryReadSqlValueInternal for SQLVECTOR#4156

Open
SimonCropp wants to merge 1 commit intodotnet:mainfrom
SimonCropp:Avoid-redundant-array-alloc-when-TryReadSqlValueInternal-for-SQLVECTOR
Open

Avoid redundant array alloc when TryReadSqlValueInternal for SQLVECTOR#4156
SimonCropp wants to merge 1 commit intodotnet:mainfrom
SimonCropp:Avoid-redundant-array-alloc-when-TryReadSqlValueInternal-for-SQLVECTOR

Conversation

@SimonCropp
Copy link
Copy Markdown
Contributor

No description provided.

@github-project-automation github-project-automation bot moved this to To triage in SqlClient Board Apr 8, 2026
@SimonCropp SimonCropp requested a review from a team as a code owner April 8, 2026 02:44
Copilot AI review requested due to automatic review settings April 8, 2026 02:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes an unnecessary byte[] allocation when reading binary/vector TDS values in TryReadSqlValueInternal, relying on TryReadByteArrayWithContinue to allocate (or reuse snapshot storage) as needed.

Changes:

  • Eliminates a redundant new byte[length] prior to calling TryReadByteArrayWithContinue(...).
  • Uses inline out byte[] b declaration to keep allocation responsibility inside TryReadByteArrayWithContinue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To triage

Development

Successfully merging this pull request may close these issues.

2 participants