Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2011

Rsp: optimize in-memory size

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Minor
    • 3.6.8, 4.0
    • None
    • None

    Description

      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:

      1. received, suspected and unreachable can be compacted into a byte field (flags)
      2. retval and exception can be merged into Object value
      3. 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.

      Attachments

        Activity

          People

            rhn-engineering-bban Bela Ban
            rhn-engineering-bban Bela Ban
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: