Vladimir Ozerov created IGNITE-1539: ---------------------------------------
Summary: Marshaller performance micro-optimizations. Key: IGNITE-1539 URL: https://issues.apache.org/jira/browse/IGNITE-1539 Project: Ignite Issue Type: Task Components: general Affects Versions: 1.1.4 Reporter: Vladimir Ozerov Fix For: ignite-1.5 The main goal of marshalling is to write an object to byte[]/ByteBuffer, or read from it. Currently each read/write is surrounded by quite a few additional actions which can be avoided either in general, or in some specific cases. Looks like we can apply lots of micro-optimizations to our marshallers: 1) Do not perform HashMap lookups for each field ID. 2) Pre-calculate field IDs for reflection-based types. 3) Pre-calculate metadata for reflection-based types and do not track it. 4) Avoid "raw" mode checks for reflection-based types. 5) Merge small writes into bigger ones where possible. E.g. WRITE_INT_FIELD_ID + WRITE_INT_FIELD_LEN can be replaced with a single WRITE_LONG when field length is constant. 6) Memory bounds checks can be avoided in lots cases if we read/write object part with pre-defined length. 7) For objects having only fixed-length fields, we can pre-calculate a kind of template seriously minimizing writes. 8) Anything else? Applying some of these optimizations in .Net shows very promising results with up to 40% throughput increase. -- This message was sent by Atlassian JIRA (v6.3.4#6332)