Files
coredns/plugin
Miek Gieben f8551df272 cache: move goroutine closure to separate function to save memory (#3353)
The goroutine closure was causing objects to be heap allocated.  Moving
it to a separate function fixes that.

```benchmark                                old ns/op     new ns/op     delta
BenchmarkCacheResponse/NoPrefetch-12     773           713           -7.76%
BenchmarkCacheResponse/Prefetch-12       878           837           -4.67%
BenchmarkHash-12                         9.17          9.18          +0.11%

benchmark                                old allocs     new allocs     delta
BenchmarkCacheResponse/NoPrefetch-12     9              8              -11.11%
BenchmarkCacheResponse/Prefetch-12       9              8              -11.11%
BenchmarkHash-12                         0              0              +0.00%

benchmark                                old bytes     new bytes     delta
BenchmarkCacheResponse/NoPrefetch-12     471           327           -30.57%
BenchmarkCacheResponse/Prefetch-12       471           327           -30.57%
BenchmarkHash-12                         0             0             +0.00%
```

Signed-off-by: Charlie Vieth <charlie.vieth@gmail.com>
Signed-off-by: Miek Gieben <miek@miek.nl>
2019-10-03 15:05:44 +01:00
..
2019-10-01 07:41:29 +01:00
2019-10-01 07:41:29 +01:00
2019-09-26 13:19:45 +01:00
2019-09-28 10:40:43 +01:00
2019-10-01 07:41:29 +01:00
2019-09-28 10:40:43 +01:00
2019-10-01 07:41:29 +01:00
2019-10-01 07:41:29 +01:00
2019-10-01 07:41:29 +01:00
2019-10-01 20:45:52 +01:00
2019-09-27 11:10:34 +01:00
2019-09-26 13:19:45 +01:00
2019-08-28 09:41:11 -04:00
2019-09-26 13:19:45 +01:00
2019-10-01 07:41:29 +01:00
2019-09-28 10:40:43 +01:00
2019-09-26 13:19:45 +01:00
2019-10-01 07:41:29 +01:00
2019-09-28 10:40:43 +01:00
2019-10-01 07:41:29 +01:00
2019-08-24 18:14:25 +00:00
2018-07-19 16:23:06 +01:00
2019-08-21 16:08:55 -04:00
2019-08-21 16:08:55 -04:00