You might want to have a benchmark for this. Allocation in Java is cheap,
but would increase the GC costs; resetting builder will introduce some CPU
overhead (recursively setting data members and bit masks).
On Fri, Apr 22, 2011 at 6:15 AM, David Dabbs wrote:
> Hello.
>
> I have a PB builder I b
Hello.
I have a PB builder I build and write to a stream from a servlet-based
webapp thousands of times/second.
Something like the following
Protos.Response.Builder respBuilder =
Protos.Response.newBuilder().setFoo(12).setBar(345); // etc. . .
Protos.Response response = respBuilder.build(