ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vyacheslav Daradur (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-5097) BinaryMarshaller should write ints in "varint" encoding where it makes sense
Date Mon, 22 May 2017 12:00:09 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-5097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16019501#comment-16019501
] 

Vyacheslav Daradur commented on IGNITE-5097:
--------------------------------------------

bq. the max size is going to take 5 bytes then
Yes, Integer.MAX_VALUE will took 5 bytes.

I've prepared the tests to show size limits:
BinaryUtilsSelfTest#testSizeInUnsignedVarint
BinaryUtilsSelfTest#testSizeInSignedVarint
Please, take a look:
https://github.com/apache/ignite/pull/1902/files#diff-3f0e73696aef50d25ad791438f2625f0R82

{quote}
There is an issue with implementation for Collections, Maps and Arrays of objects - in C++
length of these types implemented in 3 steps:
1. Open writing session;
2. Write objects one by one;
3. Close session.
{quote}
Is resize-array or shift operations "expensive" in platfroms?
Can you provide some extra step after a session closing?
Just for example:
4. Write an array size to reserved place and shift the data.

> BinaryMarshaller should write ints in "varint" encoding where it makes sense
> ----------------------------------------------------------------------------
>
>                 Key: IGNITE-5097
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5097
>             Project: Ignite
>          Issue Type: Task
>          Components: general
>    Affects Versions: 2.0
>            Reporter: Vladimir Ozerov
>            Assignee: Vyacheslav Daradur
>              Labels: important, performance
>             Fix For: 2.1
>
>
> There are a lot of places in the code where we write integers for some special purposes.
Quite often their value will be vary small, so that applying "varint" format could save a
lot of space at the cost of very low additional CPU overhead. 
> Specifically:
> 1) Array/collection/map lengths
> 2) BigDecimal's (usually will save ~6 bytes)
> 3) Strings
> 4) Enum ordinals



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message