Serialize length-prefixed protos once (#27252)
Avoid calling ByteSize() separately in serialize_length_prefixed(). The serialized payload already carries the exact length to prefix, so this keeps behavior intact while avoiding a duplicate serialization-sized pass. Closes #27252 COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/27252 from Zaczero:python-serialize-length-prefixed-once 8a4f60b4c72fbd60c624e89dcfd25d76b7ff452d PiperOrigin-RevId: 923539199
K
Kamil Monicz committed
e090f8ae778cb3513ee2ecb25bbd015ef1bbe6de
Parent: 00f4fcc
Committed by Copybara-Service <copybara-worker@google.com>
on 5/29/2026, 7:19:19 PM