$ the-wire · showcase
Spanner Python client cuts copy on point queries and stops double-counting metrics
By RepoJournal · Filed · About Google · Composed from the cited sources · methodology
The google-cloud-spanner Python client got two performance changes from the same author today: fewer protobuf copies on small result sets, and a metrics pipeline that no longer captures operation data twice or truncates streaming latency, alongside a routine XLA pin bump in JAX.
perf(spanner): optimize single-chunk results and single-row lookups googleapis/google-cloud-python
Streamed result decoding now avoids copying response_pb.values into a Python list on unchunked responses, so downstream decoders read or slice the protobuf container directly, and _merge_values() gained a fast path that decodes and appends a row in one step when total_values == width. Point lookups and small result sets, the shape most ORM-style single-row reads produce, are the ones that benef...
fix(spanner): eliminate duplicate metrics capture and measure full streaming latency googleapis/google-cloud-python
Unary RPCs were capturing operation metrics twice, because trace_call entered MetricsCapture unconditionally while Database, Session, Snapshot, Transaction, and Batch caller methods wrapped their calls in it again. The fix removes the redundant capture, measures streaming query latency across the full stream lifetime instead of a slice of it, and caches resource attributes to cut per-RPC overhe...
fix(spanner): eliminate duplicate metrics capture and measure full streaming latency (#18605) googleapis/google-cloud-python
The commit that lands the metrics fix on the main branch, mirroring the pull request above.
Update XLA dependency to use revision http://github.com/openxla/xla/commit/ed6af4928253db696667c757a291a949451c9d40 google/jax
JAX's pinned OpenXLA revision moved to the commit dated 2026-10-10T02:43:47 UTC, an automated dependency bump with no other changes.