The in-memory size of Rsp can be made smaller. Currently, it looks like this:
public class Rsp {
protected boolean received;
protected boolean suspected;
protected boolean unreachable;
protected final Address sender;
protected T retval;
protected Throwable exception;
}
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:
public class Rsp {
protected byte flags;
protected Object value;
}
Size of Rsp is 32 bytes (used JOL to measure) before, and 24 bytes after the changes.