[infinispan-dev] Re: JProfiler snapshots for Infinispan+JBMAR

David M. Lloyd david.lloyd at redhat.com
Wed May 13 18:38:26 EDT 2009


On 05/13/2009 05:02 PM, Manik Surtani wrote:
> On 13 May 2009, at 21:28, David M. Lloyd wrote:
> 
>>  - This object is predefined = 1 byte
>>  - This is the custom ID of the predefined object = 1 byte
>>  - This is the custom object data = N bytes
> 
> Can't the first 2 be combined into a single byte?  That's what I do in 
> my hand-wired marshaller.  I assume that all objects are predefined, and 
> use a special, reserved 'custom ID' to denote that the object is *not* 
> predefined.  Basically, I serialize a boolean into 2 bytes.

Sure, you needed to do that because you included all the basic primitive 
wrapper types and other stuff as custom objects.  River already optimizes 
these down to a very small number of bytes (1 byte for Boolean and Byte, 2 
bytes for Short, etc., plus one byte in the case where there needs to be a 
class descriptor).

Also, I believe I can squeeze more bytes out of your custom marshallers as 
well - I'll look them over once Galder is done.

- DML



More information about the infinispan-dev mailing list