Skip to content

Optimize BuildTableQuery() - #521

Merged
SergeiPavlov merged 1 commit into
master-servicetitanfrom
BuildTableQuery
Sep 14, 2026
Merged

SergeiPavlov merged 1 commit into
master-servicetitanfrom
BuildTableQuery

Conversation

@SergeiPavlov

@SergeiPavlov SergeiPavlov commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Pre-set capacity to avoid List reallocations


Note

Low Risk
Internal SQL compilation tweak with no intended semantic change beyond list pre-allocation.

Overview
BuildTableQuery() now passes an upfront column capacity into SqlDml.Select (tableRef.Columns.Count + indexColumns.Count) so the select’s column list is sized before index columns are added, instead of bumping queryColumns.Capacity after creation.

Also removes an unused Handlers.DomainHandler local. Behavior of generated SQL should be unchanged; this is allocation/reallocation avoidance on a hot ORM compilation path.

Reviewed by Cursor Bugbot for commit d25a91a. Bugbot is set up for automated code reviews on this repo. Configure here.

@SergeiPavlov
SergeiPavlov merged commit 0d645f4 into master-servicetitan Sep 14, 2026
37 checks passed
@SergeiPavlov
SergeiPavlov deleted the BuildTableQuery branch September 14, 2026 22:59
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.

3 participants