Thanks Brad.

I will check this out and get back to you.

Thanks

On Tue, 8 Aug 2023, 22:45 Brad Town, <tow...@google.com> wrote:

> If you are doing something like this:
>
>     *foo.mutable_bar() = {strings.begin(), strings.end()};
>
> You would probably see an improvement if you change it to this:
>
>     foo.mutable_bar()->Assign(strings.begin(), strings.end());
>
> Brad
>
> On Mon, Aug 7, 2023 at 10:47 PM Deepak Jain <jain1...@gmail.com> wrote:
>
>> Hello guys,
>>
>> We have a repeated field of GFrameQuery and we have a std::vector.
>>
>> So, now we need conversion from vector to repeated field.
>>
>> So we do like
>> {vec.begin(), vec.end()}
>>
>> which is a standard thing to do.
>> But it involved memcy and therefore, it is resulting in performance
>> degradation when lakhs of query come and for each query we have to do such
>> memcy for vector to repeated field and then repeated field to vector
>> conversion.
>>
>> So, is their any other way to achieve this?
>> Performance is the key here and that should not be comprised if we
>> compare to other RPC like thrift which works well in above scenario.
>>
>> Any solution will be appreciated.
>>
>> Thanks
>> Deepak Jain
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "grpc.io" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to grpc-io+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grpc-io/CAJhXTGf4kv4J56D657Qkn7KM%2B_V9H66%3Dpg6O1Rioh2LhygJf3w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/grpc-io/CAJhXTGf4kv4J56D657Qkn7KM%2B_V9H66%3Dpg6O1Rioh2LhygJf3w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CAJhXTGf96XjE9Xqj9LTabBd2o%2BHtuzgBSWjqZbnkHQ3mP_SyyQ%40mail.gmail.com.

Reply via email to