mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 02:03:13 -05:00
Do Compress only when need in request.Scrub (#1760)
* Remove Compress by default Set Compress = true in Scrub only when the message doesn not fit the advertized buffer. Doing compression is expensive, so try to avoid it. Master vs this branch pkg: github.com/coredns/coredns/plugin/cache BenchmarkCacheResponse-2 50000 24774 ns/op pkg: github.com/coredns/coredns/plugin/cache BenchmarkCacheResponse-2 100000 21960 ns/op * and make it compile
This commit is contained in:
@@ -136,7 +136,6 @@ func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
ret.Compress = true
|
||||
// When using force_tcp the upstream can send a message that is too big for
|
||||
// the udp buffer, hence we need to truncate the message to at least make it
|
||||
// fit the udp buffer.
|
||||
|
||||
Reference in New Issue
Block a user