]
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.