zyq001 / thrift-protobuf-compare

Automatically exported from code.google.com/p/thrift-protobuf-compare
0 stars 0 forks source link

Protobuf serializer should reuse Builder() #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It can be achieved by adding the 

private field GSONBuilder builder = MediaContent.newBuilder();

in method create() replace builder initialization with: 

builder.clear();
return builder.setMedia(...).addImage().addImage(...).build;

Original issue reported on code.google.com by yurchenk...@gmail.com on 6 May 2013 at 5:04

GoogleCodeExporter commented 9 years ago
I believe this fix will significantly improve the time of Object Creation test.

Original comment by yurchenk...@gmail.com on 6 May 2013 at 5:06