Decrease a relay buffer size for MIPS devices

This commit is contained in:
9seconds
2026-03-29 21:42:26 +02:00
parent 1725a0d721
commit d3a090d6b4
4 changed files with 43 additions and 12 deletions
@@ -0,0 +1,13 @@
//go:build mips || mipsle
package relay
import "github.com/9seconds/mtg/v2/mtglib/internal/tls"
const (
// MIPS is quite short in resources, and usually it means that it will run
// on Microtiks, OpenWRT-based routers or similar hardware. I think it worth
// to sacrifice a number of read syscalls (read, CPU load) to shrink
// limited RAM resources.
bufPoolSize = tls.MaxRecordPayloadSize / 2
)