ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Ozerov <voze...@gridgain.com>
Subject Sorting fields of Binarilyzable objects on write
Date Mon, 10 Apr 2017 14:53:46 GMT
Zapalniki,

Inspired by IGNITE-4669 (.NET: Sort binary object fields) [1].

Currently we sort binary object fields before when writing them to the
output stream in case of standard (Serializable) objects and
BinaryObjectBuilder. This makes sense as we have stable binary object
representation irrespective of fields order, which is very important e.g.
for DML. And it works fine from performance perspective as well:
- For standard classes we sort fields only once during initialization;
- For builder we have to maintain the whole object graph in memory before
writing anyway as builder is mutable, so sorting doesn't impose serious
performance hit.

But what to do with Binarilyzable classes? We can sort their fields as
well, but it means that:
1) We will not be able to write them directly to stream. Instead, we will
accumulate values in memory, and write only when the whole object graph is
known.
2) Currently reads are mostly sequential from memory perspective. With this
change reads will become random.

So we will loose both read and write serialization performance. How do you
think - do we need this change or not?

Vladimir.

[1] https://issues.apache.org/jira/browse/IGNITE-4669

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message