SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 34 C++

[Py/C++ Optimization]: cache prototype in the `CMessageClass`

This avoids calling `GetPrototype()` every time a message is constructed, which would acquire a lock.

There is no need to look it up every time, because it will never change as long as the MessageFactory is alive.

PiperOrigin-RevId: 910918341
J
Joshua Haberman committed
62074624a9ec6580a4bc845ca06e5c8cc4e6c7a1
Parent: 1da22aa
Committed by Copybara-Service <copybara-worker@google.com> on 5/5/2026, 9:35:54 PM