mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00
chore: memory optimization for access log
This commit is contained in:
parent
829eb08e37
commit
100d2c392f
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ func NewAccessLoggerWithIO(parent task.Parent, writer WriterWithName, anyCfg Any
|
|||
task: parent.Subtask("accesslog."+writer.Name(), true),
|
||||
cfg: cfg,
|
||||
writer: bufio.NewWriterSize(writer, cfg.BufferSize),
|
||||
lineBufPool: synk.NewBytesPool(512, 8192),
|
||||
lineBufPool: synk.NewBytesPool(256, 768), // for common/combined usually < 256B; for json < 512B
|
||||
errRateLimiter: rate.NewLimiter(rate.Every(errRateLimit), errBurst),
|
||||
logger: logging.With().Str("file", writer.Name()).Logger(),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue