Hi Feng

Thanks for quick reply. Is there any alternative to parse proto to JSON
which performance is a concern.

Regards
Jiten

On Mon, Jun 25, 2018 at 10:51 PM, Feng Xiao <[email protected]> wrote:

>
>
> On Mon, Jun 25, 2018 at 10:02 AM Jiten Gupta <[email protected]>
> wrote:
>
>> Hi,
>>
>> I am using google proto and we need to convert proto payload   to JSON to
>> be sent out for monitoring and logging purpose. Size of the payload is
>> around 10KB. We are using JsonFormat.printer().print for proto to json
>> conversion.
>>
>> We are running on 4 cores CPU and we need to do around 30-40 such
>> conversion at a time.
>>
>> When I do profiling, I see there is quite a bit CPU time is spent on
>> proto to JSON converson. ( Screen shot attached)
>>
>> I JsonFormat.printer().print best way to do proto to json conversion ?
>>
> It's the official way, but maybe not the best performant way. If
> performance is a concern, you probably should consider using proto binary
> directly?
>
>
>>
>> REgards
>> Jiten
>>
>>
>> --
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/protobuf.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to