[
https://issues.jboss.org/browse/JGRP-2011?page=com.atlassian.jira.plugin....
]
Bela Ban updated JGRP-2011:
---------------------------
Description:
The in-memory size of {{Rsp}} can be made smaller. Currently, it looks like this:
{noformat}
public class Rsp {
protected boolean received;
protected boolean suspected;
protected boolean unreachable;
protected final Address sender;
protected T retval;
protected Throwable exception;
}
{noformat}
Optimizations:
# received, suspected and unreachable can be compacted into a byte field (flags)
# retval and exception can be merged into {{Object value}}
# sender can be removed: {{RspList}} already has the sender
New format:
{noformat}
public class Rsp {
protected byte flags;
protected Object value;
}
{noformat}
Size of {{Rsp}} is 32 bytes (used JOL to measure) before, and 24 bytes after the changes.
was:
The in-memory size of {{Rsp}} can be made smaller. Currently, it looks like this:
{noformat}
public class Rsp {
protected boolean received;
protected boolean suspected;
protected boolean unreachable;
protected final Address sender;
protected T retval;
protected Throwable exception;
}
{noformat}
Optimizations:
# received, suspected and unreachable can be compacted into a byte field (flags)
# retval and exception can be merged into {{Object value}}
# sender can be removed: {{RspList}} already has the sender
Size of {{Rsp}} is 32 bytes (used JOL to measure) before, and 24 bytes after the changes.
Rsp: optimize in-memory size
----------------------------
Key: JGRP-2011
URL:
https://issues.jboss.org/browse/JGRP-2011
Project: JGroups
Issue Type: Enhancement
Reporter: Bela Ban
Assignee: Bela Ban
Priority: Minor
Fix For: 3.6.8, 4.0
The in-memory size of {{Rsp}} can be made smaller. Currently, it looks like this:
{noformat}
public class Rsp {
protected boolean received;
protected boolean suspected;
protected boolean unreachable;
protected final Address sender;
protected T retval;
protected Throwable exception;
}
{noformat}
Optimizations:
# received, suspected and unreachable can be compacted into a byte field (flags)
# retval and exception can be merged into {{Object value}}
# sender can be removed: {{RspList}} already has the sender
New format:
{noformat}
public class Rsp {
protected byte flags;
protected Object value;
}
{noformat}
Size of {{Rsp}} is 32 bytes (used JOL to measure) before, and 24 bytes after the changes.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)