Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ProtobufSerializer minimize getSerializedSize() usage (apple#2694)
Motivation: ProtobufSerializer uses `MessageLite.getSerializedSize()` on each serialization operation. This method may require a deep traversal of all internal objects and require intermediate allocations (e.g. for maps) to compute the actual size. Modifications: - Use `CodedOutputStream.getTotalBytesWritten()` and `CodedInputStream.getTotalBytesRead()` to determine how many bytes were generated/consumed during serialization.
- Loading branch information