I generated xml and protobuf messages and it seems Protobuf message is 3.5 
times smaller than xml for my project.
I am very satisfied :)

However when it comes to *performance, I think I did something wrong..*
I use Spring boot and I have the following methods for Jmeter test.
The XML method below is 4-5 times faster than the Protobuf method. 

      @RequestMapping(value = "/getpbmsg")
ProtobufGeneratedFile.Pojo getPbMsg(@RequestBody Pojo pojo) throws 
IOException {
PojoToProtobufConvertor pbParser = new PojoToProtobufConvertor(pojo);
return pbParser.convertInboxPojo();
@RequestMapping(value = "/getxmlmsg", 
Pojo getXmlMsg(@RequestBody  Pojo pojo) throws IOException {
return pojo;

I convert a pojo to a ProtobufGeneratedFile.Pojo object. 
'ProtobufGeneratedFile' file was generated by 'protoc.exe'.
I produced a protobuf message in the following way,






.map(pojoMsg -> 






I am wondering if this is the most optimized way.
I think there is a better way to convert a pojo to a protobuf message.


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to