Skip to content

perf(Spanner): Eliminate extend overhead#8865

Open
alkatrivedi wants to merge 3 commits into
mainfrom
eliminate-extend
Open

perf(Spanner): Eliminate extend overhead#8865
alkatrivedi wants to merge 3 commits into
mainfrom
eliminate-extend

Conversation

@alkatrivedi

Copy link
Copy Markdown
Contributor

Removing unnecessary overhead from the extend dependency where simple shallow merges are sufficient to reduce CPU ticks and improvement in the performance of node client

@alkatrivedi alkatrivedi requested a review from a team as a code owner July 13, 2026 06:57

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the external extend dependency with native Object.assign and explicit property assignments across various source and test files in the Spanner client library. The reviewer feedback is highly constructive, suggesting the complete elimination of the remaining extend deep copies by using shallow copies with Object.assign where safe. Additionally, the reviewer points out several redundant type assertions (such as casting gaxOpts and reqOpts) that can be removed to simplify and clean up the conditional property assignments.

Comment thread handwritten/spanner/src/database.ts
Comment thread handwritten/spanner/src/database.ts Outdated
Comment thread handwritten/spanner/src/database.ts Outdated
Comment thread handwritten/spanner/src/database.ts Outdated
Comment thread handwritten/spanner/src/index.ts
Comment thread handwritten/spanner/src/index.ts Outdated
Comment thread handwritten/spanner/src/index.ts Outdated
Comment thread handwritten/spanner/src/instance.ts
Comment thread handwritten/spanner/src/instance.ts Outdated
@alkatrivedi alkatrivedi changed the title Eliminate extend per: Eliminate extend overhead Jul 13, 2026
@alkatrivedi alkatrivedi changed the title per: Eliminate extend overhead perf: Eliminate extend overhead Jul 13, 2026
@alkatrivedi alkatrivedi changed the title perf: Eliminate extend overhead perf(Spanner): Eliminate extend overhead Jul 13, 2026
@product-auto-label product-auto-label Bot added the api: spanner Issues related to the Spanner API. label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the Spanner API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant