Jacob S. Barrett created GEODE-6166:
---------------------------------------

             Summary: Reduce garbage production in put operation path
                 Key: GEODE-6166
                 URL: https://issues.apache.org/jira/browse/GEODE-6166
             Project: Geode
          Issue Type: Improvement
          Components: core
            Reporter: Jacob S. Barrett


While debugging another issue I notice a less than optimal path for serializing 
\{{Operation}} objects during puts and destroys. The class is 
java.io.Serializable so it goes through  several checks to see if it can be 
serialized another way before falling back to Java serialization. One of these 
checks creates a few objects that are not necessary until later I the function 
but after it would short circuit for {{Operation}}. Additionally, the only 
member in the class that is non-transient is a byte field indicating the 
ordinal. This results in a 64 byte Java serialization to transmit a byte. 
Converting to DataSerializableFixedID poses a challenge with backwards 
compatibility when deserializing a message sent as Java serializable. It also 
costs about 4 bytes for a single byte [DSCODE (byte) + FIXED-ID (short) + VALUE 
(byte)]. Writing a single byte to the message part costs a single byte and 
makes detecting old clients sending objects trivial. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to