You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(wire): one-shot decode_text for small memoryview inputs (ISSUE-65)
For memoryview inputs below 64 KiB, materialize once and use
bytes.find to locate the NUL terminator — a single allocation and a
single C-level scan. The previous chunked path allocated a fresh
4 KiB bytes object per chunk, even when the NUL was already in the
first chunk (the overwhelmingly common case in the RowsResponse hot
path). Chunked scan is retained as a fallback for pathologically
long text payloads so peak memory stays bounded.
Existing tests cover both branches (small/large); all pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments