Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No or almost no additional overhead is expected comparing to Ignite 1.4 after warmup.

Object read

  • Check if object's schema is known. Normally this will require only 1-2 int comparisons. If no, we scan the whole object, create the schema and save it.
  • Until object read schema matches object write schema, we just read the object sequentially. Schema matching is performed using reference string equality as field names are usually interned literals. In case of failed comparison we fallback to normal "String.equals()".
  • If read/write schemas mismatch is detected, we fallback to random field read. Normally mismatch will only occur if different object versions co-exist in runtime. 

No or almost no additional overhead is expected comparing to Ignite 1.4 after warmup.

Random object field read

  • Check if object's schema is known. Normally this will require only 1-2 int comparisons. If no, we scan the whole object, create the schema and save it.
  • Field name is converted to field ID as usual;
  • Schema is queried for field ID order. We need to evaluate possible techniques for fast int lookup: normal HashMap, open-addressing like in ThreadLocal's, specialized int-int maps. Anyways, even HashMap should usually sustain 0(1) complexity;
  • Go to footer and get field offset: FieldOffset = valueOf(INT_VALUE_AT(ObjectStart + FooterOffset + FieldIdOrder * 8 + 4);
  • Use FIeldOffset to get the field.

...