mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2024-12-29 12:17:48 +00:00
b0d217f664
Implementations of the legacy Marshaler type have no way to efficiently compute the size of the message. Rather than generating an inefficient fast-path Size method which marshals the message and examines the length of the result, don't generate a fast-path at all. Drop the requirement that a fast-path MarshalAppend requires a corresponding Size. Avoids O(N^2) behavior when marshaling a legacy Marshaler that recursively calls proto.Marshal. Change-Id: I4793cf32275d08f29c8e1a1a44a193d9a5724058 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/213443 Reviewed-by: Joe Tsai <joetsai@google.com> |
||
---|---|---|
.. | ||
bench_test.go | ||
decode_gen.go | ||
decode_test.go | ||
decode.go | ||
doc.go | ||
encode_gen.go | ||
encode_test.go | ||
encode.go | ||
equal_test.go | ||
equal.go | ||
extension_test.go | ||
extension.go | ||
isinit_test.go | ||
isinit.go | ||
merge_test.go | ||
merge.go | ||
messageset_test.go | ||
messageset.go | ||
methods_test.go | ||
noenforceutf8_test.go | ||
proto_methods.go | ||
proto_reflect.go | ||
proto.go | ||
reset_test.go | ||
reset.go | ||
size_gen.go | ||
size.go | ||
testmessages_test.go | ||
weak_test.go | ||
wrappers.go |