Nikolay Izhikov created IGNITE-29257:
----------------------------------------

             Summary: Avoid BinaryReaderHandlesHolder allocation in 
BinaryReaderExImpl#readObjectDetached
                 Key: IGNITE-29257
                 URL: https://issues.apache.org/jira/browse/IGNITE-29257
             Project: Ignite
          Issue Type: Improvement
            Reporter: Nikolay Izhikov
            Assignee: Nikolay Izhikov


{{BinaryReaderExImpl#readObjectDetached}} allocates a new 
{{BinaryReaderHandlesHolder}} on every call to start a fresh handles context 
for the detached object.

The reader itself is a {{BinaryReaderHandlesHolder}}, so the allocation can be 
avoided: temporarily reset the reader's own handles, run the detached read with 
the reader as the holder, and restore the previous handles in {{finally}}. 
{{BinaryReaderHandlesHolder#handles()}} creates handles lazily, so the detached 
read still starts with an empty context.

No behaviour change.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to