Files
grpc/include/grpcpp/impl/codegen
Soheil Hassas Yeganeh ad1b3e5094 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()

This commit reaplies 509e77a5a3
2019-03-21 06:03:45 -04:00
..
2018-10-31 01:02:07 -07:00
2019-02-26 03:08:06 -08:00
2018-02-15 14:49:34 -08:00
2019-01-28 16:18:49 -08:00
2018-10-24 17:25:51 -07:00
2018-02-15 14:49:34 -08:00
2018-02-16 12:42:05 +01:00
2018-04-12 17:19:54 -07:00
2019-03-18 16:51:15 -07:00
2018-02-15 14:49:34 -08:00