[infinispan-dev] Adaptive marshaller buffer sizes - ISPN-1102

Sanne Grinovero sanne at infinispan.org
Thu Jun 9 18:45:47 EDT 2011


Actually on this thread I keep getting confused about what is the
issue we want to solve. Initially I thought it was about allocating
the buffer to externalize known object types, as I saw the growing
buffer logic in the MarshalledValue so the discussion seemed
interesting to me, but I was corrected that it's about estimating the
receiving buffer.

Then why don't we prefix all messages with the length, read that long
first, and then proceed by allocating exactly what we know will be
needed?
(If the point is that we can't read the long without a first buffer,
then we can't read the type for the first marshaller either, but we
can at least reduce it to single estimate & resize once to exact
size).

Seems too simple, so I would appreciate it if somebody could recap
what the problem is about.

Sanne

2011/6/9 Manik Surtani <manik at jboss.org>:
>
> On 25 May 2011, at 08:45, Galder Zamarreño wrote:
>
>>>
>>> Looks great Galder, although I could use some comments on how the
>>> possible buffer sizes are chosen in your algorithm :-)
>>
>> I'll ping you on IRC.
>
> Could you make sure this is properly documented in the impl classes, whether in Javadoc or comments?
>
> --
> Manik Surtani
> manik at jboss.org
> twitter.com/maniksurtani
>
> Lead, Infinispan
> http://www.infinispan.org
>
>
>
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>



More information about the infinispan-dev mailing list