You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Tupitsyn (JIRA)" <ji...@apache.org> on 2015/10/27 13:26:27 UTC

[jira] [Commented] (IGNITE-1779) .Net: Evaluate BinaryFormatter overhead for generic collections.

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

Pavel  Tupitsyn commented on IGNITE-1779:
-----------------------------------------

{code:title=PortableSelfTest.cs}
        [Test]
        public void TestArraySerializable()
        {
            var serArr = Enumerable.Range(1, 10000).Select(x => new SerializableObject {Foo = x}).ToArray();
            var objArr = serArr.OfType<object>().ToArray();

            Console.WriteLine("As serializable: " + _marsh.Marshal(serArr).Length / serArr.Length);
            Console.WriteLine("As object array: " + _marsh.Marshal(objArr).Length / serArr.Length);
        }
{code}

As serializable: 18
As object array: 232

> .Net: Evaluate BinaryFormatter overhead for generic collections.
> ----------------------------------------------------------------
>
>                 Key: IGNITE-1779
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1779
>             Project: Ignite
>          Issue Type: Task
>          Components: interop
>    Affects Versions: ignite-1.4
>            Reporter: Vladimir Ozerov
>            Assignee: Pavel  Tupitsyn
>            Priority: Critical
>             Fix For: 1.5
>
>
> It seems that BinaryFormatter is extreeeemly inefficient. I tried to write a single Guid with and it resulted in >100 bytes comparing to 16 bytes when written in portable form. 
> If we notice the same overhead for collections/arrays which are fairly often used types, we will have to revert to our initial approach when collections were serialized using our own mechanics.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)