begin working on making response quicker (why is tap interface so slow?)

This commit is contained in:
soypat
2025-06-01 01:29:07 -03:00
parent 1acc5f70cd
commit a29bad9ac9
8 changed files with 52 additions and 19 deletions
+5
View File
@@ -7,6 +7,7 @@ type BackoffFlags uint8
const (
BackoffHasPriority BackoffFlags = 1 << iota
BackoffCriticalPath
BackoffTCPConn
)
func NewBackoff(priority BackoffFlags) Backoff {
@@ -14,6 +15,10 @@ func NewBackoff(priority BackoffFlags) Backoff {
return Backoff{
maxWait: uint32(1 * time.Millisecond),
}
} else if priority&BackoffTCPConn != 0 {
return Backoff{
maxWait: uint32(5 * time.Microsecond),
}
}
return Backoff{
maxWait: uint32(time.Second) >> (priority & BackoffHasPriority),