mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-10-01 16:26:02 -04:00
leverage local buffer
This commit is contained in:
parent
7e499ee0b6
commit
1931820c4c
@ -36,7 +36,7 @@ func (this *BufferedSegmentWriter) Write(seg Segment) {
|
||||
}
|
||||
|
||||
if this.buffer == nil {
|
||||
this.buffer = alloc.NewSmallBuffer().Clear()
|
||||
this.buffer = alloc.NewLocalBuffer(2048).Clear()
|
||||
}
|
||||
|
||||
this.buffer.Value = seg.Bytes(this.buffer.Value)
|
||||
|
Loading…
Reference in New Issue
Block a user