Fix #129: Excessive memory usage streaming large files (#142)

This drops the default size auf the h2mux write buffer from 512 MB to 1 MB.
This massively reduces memory usage, since each stream has its own buffer.
This commit is contained in:
Felix Bünemann 2019-10-18 00:15:51 +02:00 committed by Silver
parent 6322c5029d
commit 1f6a330098
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ const (
maxWindowSize uint32 = (1 << 31) - 1 // 2^31-1 = 2147483647, max window size in http2 spec
defaultTimeout time.Duration = 5 * time.Second
defaultRetries uint64 = 5
defaultWriteBufferMaxLen int = 1024 * 1024 * 512 // 500mb
defaultWriteBufferMaxLen int = 1024 * 1024 // 1mb
SettingMuxerMagic http2.SettingID = 0x42db
MuxerMagicOrigin uint32 = 0xa2e43c8b