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
Add splitkwargs methods to avoid excessive allocations (#126)
* Add splitkwargs methods to avoid excessive allocations
On current master, we have the unfortunate situation where users of
`splitkwargs` can't avoid some ~8.5K allocations, as shown by:
```julia
julia> @time GzipDecompressorStream(buf)
0.002668 seconds (8.47 k allocations: 404.656 KiB)
TranscodingStreams.TranscodingStream{GzipDecompressor, Base.BufferStream}(<mode=idle>)
```
With this code in this PR (new method specializations for splitkwargs), as suggested
by @nickrobinson251, we now get:
```julia
julia> @time GzipDecompressorStream(buf)
0.000021 seconds (10 allocations: 32.562 KiB)
TranscodingStreams.TranscodingStream{GzipDecompressor, Base.BufferStream}(<mode=idle>)
```
This was discovered as we're starting to review performanc and allocations in HTTP.jl,
which uses `GzipDecompressorStream` to automatically decode responses with the gzip
encoding.
Co-Authored-By: Nick Robinson <[email protected]>
* Compat for 1.6
Co-authored-by: Nick Robinson <[email protected]>
0 commit comments