From: Kenton Varda <ken...@google.com>
Date: Thu, 23 Jul 2009 10:42:45 -0700
Local: Thurs, Jul 23 2009 1:42 pm
Subject: Re: Java deserialization - any best practices for performances?
On Thu, Jul 23, 2009 at 12:32 AM, alopecoid <alopec...@gmail.com> wrote: You can't continue to use a Builder after calling build(). Even if we made > Hi, > I haven't actually used the Java protobuf API, but it seems to me from > 1. Reuse the Builder object by calling its clear() method. This would it so you could, it would be building an entirely new object, not reusing the old one. We can't make it reuse the old one because that would break the immutability guarantee of message objects. Reusing the actual builder object is not that useful since it's only a very > 2. Iterate over the repeated field using the get*Count() and get* Won't save anything; we still need a list object internally. > (index) methods instead of the get*List() method. I'm not sure if this > would save anything, but depending on how things are implemented in > the generated code, this could save from allocating a new List object. But seriously, object allocation with a modern generational garbage You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||