On Thu, Mar 20, 2014 at 8:40 AM,  <[email protected]> wrote:
> The message will be changed. Score isn't optional. Every docid has a score.
>
> I could try it as you suggested. Without the message.
>
> But I'm a little bit confused.
>
> I tried it with Java and with C++. Java can parse the Response in less than
> a second. C++ takes 20-25 seconds. Both times it is the same Message
> ~2.600.000 bytes large and with ~2.100.000 repeates. How can this be?

Your sizes must be wrong. If score isn't optional, your current
message should be

(<tag 2> <length varint (for submessage)> <tag 1> <varint> <tag 2>
<float>) x2.1M

That means that each entry will take at least 9 bytes, more if the
docid > 127. I don't see how this can only take up 2.6MB...

> Shouldn't C++ be faster than Java?

Yes, it should be :) I'll let someone else answer here... You could
profile the C++ code and see where the time is going...

  -ilia

-- 
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 http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to