Meir Fischer 69d4b8aa71 http2: remove unnecessary TODO for trailer keys allocation
strings.Join has two allocations:
(1) []byte intermediate
(2) final string conversion
The comma-separated keys are ultimately stored in hpack.HeaderField.Value
as a string so (2) is not wasteful. Because strings.Join is used so heavily
I assume its implementation is optimal - (1) is necessary.
Therefore, short of refactoring hpack.HeaderField's Value type, the status quo
seems optimal.

This TODO appears to have been copy-pasted from net/http/transfer.go
However, the two cases are different. transfer.go has two allocations
in addition to strings.Join: concatenation with literals and converting
string to bytes in io.WriteString.

Change-Id: I292203a6535dd2774f5bf45e7280b89aabb5d78d
Reviewed-on: https://go-review.googlesource.com/34626
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-01-02 22:16:56 +00:00
2016-01-08 17:00:32 +00:00
2016-12-15 08:38:32 +00:00
2014-12-09 14:17:11 +11:00
2016-12-15 08:38:04 +00:00
2016-12-15 08:38:19 +00:00
2014-12-09 14:17:11 +11:00
2016-09-24 02:07:28 +00:00
2016-11-15 03:56:16 +00:00
2014-12-08 10:44:07 +11:00
2015-03-18 17:04:12 +00:00
2015-02-18 23:42:41 +00:00
2012-03-17 15:20:00 +11:00
2012-01-25 15:31:30 -05:00

This repository holds supplementary Go networking libraries.

To submit changes to this repository, see http://golang.org/doc/contribute.html.
Description
[mirror] Go supplementary network libraries
Readme BSD-3-Clause 13 MiB
Languages
Go 99.9%