Commit 98453d4
Append params-tuple values onto the header bytearray in place
The prior ``return bytes(header) + b"".join(values)`` chain made
three full-size allocations: a copy of the header, a joined values
bytestring, and the final concatenation. The bytearray accumulator
collapses these to one growing buffer plus one final ``bytes()``
materialisation, matching the pattern already used by the
response-side body encoders.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent d4e8135 commit 98453d4
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
| |||
0 commit comments