[jboss-jira] [JBoss JIRA] (JGRP-1990) Headers: use 1 array rather than 2

Bela Ban (JIRA) issues at jboss.org
Fri Nov 27 07:11:00 EST 2015


    [ https://issues.jboss.org/browse/JGRP-1990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134671#comment-13134671 ] 

Bela Ban commented on JGRP-1990:
--------------------------------

Further optimizations: 
* Remove the IDs altogether and add a field {{id}} to the {{Header}} class
* Remove class {{Headers}} and use a {{Header[] hdrs}} array in {{Message}} directly. Provide methods for reading and writing of headers

> Headers: use 1 array rather than 2
> ----------------------------------
>
>                 Key: JGRP-1990
>                 URL: https://issues.jboss.org/browse/JGRP-1990
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 3.6.7
>
>
> Currently, {{Headers}} uses 1 array for ids and 1 for the actual headers. Experiment whether joining them into one array makes sense, e.g.:
> {noformat}
> | id-1 | hdr-1 | id-2 | hdr-2 | ... | id-n | hdr-n |
> {noformat}
> This saves 4 bytes (compressed OOPs) for an array ref, plus the overhead of the array itself. Plus, resizing only has to be applied to 1 array.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list