Remove alloc in packet forwarding path. (#3305)

* Remove alloc in packet forwarding path.

Unlikely logger creation was doing allocs. Replace it with a function
like in rtpstats_receiver.go so that allocations do not happen
unnecessarily.

* variable rename

* one more place
This commit is contained in:
Raja Subramanian
2025-01-06 11:48:27 +05:30
committed by GitHub
parent c792d15244
commit bfbc4fa81f
2 changed files with 38 additions and 34 deletions
-1
View File
@@ -322,5 +322,4 @@ func BenchmarkMemcpu(b *testing.B) {
for i := 0; i < b.N; i++ {
copy(buf2, buf)
}
}