tweak: optimize memory allocation and increase throughput

This commit is contained in:
yusing
2025-05-16 07:15:45 +08:00
parent a162371ec5
commit 2e68baa93e
6 changed files with 252 additions and 40 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/yusing/go-proxy/internal/utils/synk"
)
var bufPool = synk.NewBytesPool(1024, 16384)
var bufPool = synk.NewBytesPool()
// explicitly implement MarshalJSON to avoid reflection.
func (s *SystemInfo) MarshalJSON() ([]byte, error) {