Optimize HTTPHdr conversion of HTTP/1.1 to HTTP/2#6635
Optimize HTTPHdr conversion of HTTP/1.1 to HTTP/2#6635masaori335 merged 1 commit intoapache:masterfrom
Conversation
Avoid extra HdrHeap allocation and copy all headers.
|
I'm not sure if this is still true, but I think I had to generate a new HTTPHdr when I add/modify the function. The reason was probably that the original HTTPHdr was read from somewhere else later and the code expected HTTP/1.1 style. |
shinrich
left a comment
There was a problem hiding this comment.
Looks good. Updating in place makes a lot of sense.
|
@maskit Was it
|
|
@masaori335 Yes, you found it! Then it should be fine, but let me review this a bit more. |
maskit
left a comment
There was a problem hiding this comment.
I'm not a big fun of the additional initialization call for pseudo headers, but I don't have a better idea. Ideally, HTTPHdr should probably have a concept of pseudo header.
|
Cherry-picked to v9.0.x branch. |
http2_generate_h2_header_from_1_1()is one of bottlenecks of HTTP/2 subsystem because of extra HdrHeap allocation and all header copies.http2_generate_h2_header_from_1_1()is 32% ofHttp2ConnectionState::send_headers_frame()http2_convert_header_from_1_1_to_2()is 3% ofHttp2ConnectionState::send_headers_frame()