[jboss-jira] [JBoss JIRA] (JGRP-2400) FRAG4: cache marshalled output with FragmentedMessage

Bela Ban (Jira) issues at jboss.org
Thu Jan 9 10:08:33 EST 2020


     [ https://issues.redhat.com/browse/JGRP-2400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Ban updated JGRP-2400:
---------------------------
    Fix Version/s: 5.1
                       (was: 5.0)


> FRAG4: cache marshalled output with FragmentedMessage
> -----------------------------------------------------
>
>                 Key: JGRP-2400
>                 URL: https://issues.redhat.com/browse/JGRP-2400
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>            Priority: Major
>             Fix For: 5.1
>
>
> FRAG4 marshals a long message (that has *no array*) into smaller fragments, e.g. when frag_size==200, a 500 byte message is marshalled into 3 FragmentedMessages of sizes 200, 200 and 100.
> The first FragmentedMessage marshals the entire original message, but only writes the first 200 bytes to the output stream.
> The second FragmentedMessage also marshals the entire original message, and writes the second 200 bytes.
> The third message writes only the last 100 bytes.
> This means that the original message is marshalled 3 times.
> It might be faster to create an object that wraps the original message *and* a byte array, which represents the marshalled object. When marshalled for the first time, the byte array is created. The second and third time, no marshalling is performed, but instead, the FragmentedMessages access the byte array directly (at the given offsets/lengths).



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list