|
Replace the existing SpdyHeaderBlock typedef with a class.
SpdyHeaderBlock is currently a map<string, string>. This change replaces the
typedef with a class that
* behaves like a linked_hash_map<StringPiece, StringPiece>, that is, preserves
insertion order,
* and also manages memory containing the header names and values, resulting in
much fewer allocations.
String construction and destruction showed up in the CPU profile under heavy
loads, and this class addresses this performance issue.
This CL includes server change 100829267 by rjshade (for
net/spdy/hpack/hpack_{en,de}coder_test.cc), which changed SpdyHeaderBlock to a
linked_hash_map, thus preserving order. That change was not merged separately
because Chromium's linked_hash_map implementation does not support copy.
This CL also includes server changed 103293205 by birenroy, which introduces
SpdyHeaderBlock class managing large chunks of memory.
This CL also updates a large number of unittests and a small amount of
production code to account for header order being preserved.
BUG= 443287
Committed: https://crrev.com/7ecc11208382bf462982af29d1680ee5eba2ded3
Cr-Commit-Position: refs/heads/master@{#351062}
Total comments: 10
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+641 lines, -290 lines) |
Patch |
 |
M |
content/browser/devtools/devtools_netlog_observer.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
net/http/http_network_transaction_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
net/net.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/quic/spdy_utils.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/quic/test_tools/quic_test_packet_maker.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
net/spdy/hpack/hpack_decoder.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+6 lines, -10 lines |
0 comments
|
Download
|
 |
M |
net/spdy/hpack/hpack_decoder_test.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
5 chunks |
+15 lines, -14 lines |
0 comments
|
Download
|
 |
M |
net/spdy/hpack/hpack_encoder_test.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+12 lines, -13 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_framer.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_framer_test.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_header_block.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
1 chunk |
+106 lines, -3 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_header_block.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
3 chunks |
+203 lines, -3 lines |
0 comments
|
Download
|
 |
A |
net/spdy/spdy_header_block_test.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+90 lines, -0 lines |
0 comments
|
Download
|
 |
D |
net/spdy/spdy_header_block_unittest.cc
|
View
|
|
1 chunk |
+0 lines, -31 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_http_utils.cc
|
View
|
|
9 chunks |
+24 lines, -21 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_http_utils_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_network_transaction_unittest.cc
|
View
|
|
7 chunks |
+60 lines, -92 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_protocol.h
|
View
|
1
2
|
3 chunks |
+2 lines, -5 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_proxy_client_socket_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_session.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_session_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_stream.cc
|
View
|
|
1 chunk |
+9 lines, -7 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_stream_test_util.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_test_util_common.cc
|
View
|
|
10 chunks |
+15 lines, -16 lines |
0 comments
|
Download
|
 |
M |
net/spdy/spdy_test_utils.h
|
View
|
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
net/tools/flip_server/spdy_interface.cc
|
View
|
|
4 chunks |
+12 lines, -13 lines |
0 comments
|
Download
|
 |
M |
net/tools/flip_server/spdy_interface_test.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_client_bin.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_simple_client.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_simple_client_bin.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_spdy_client_stream.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/quic_spdy_server_stream_test.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
net/tools/quic/spdy_balsa_utils.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
10 chunks |
+35 lines, -24 lines |
0 comments
|
Download
|
Total messages: 28 (13 generated)
|