Uploaded image for project: 'JBoss Serialization'
  1. JBoss Serialization
  2. JBSER-84

Improve serialization of immutable objects

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.1.0 Beta
    • Labels:
      None

      Description

      It is common for objects to contain references to hundreds or thousands of equal immutable object instances, especially java.lang.Number subclasses. Some immutable objects produce a considerable serialized amount of information, such as java.math.BigDecimal. However, there's usually no reason for different instances being used to represent the same value; they only exist due to the way they were produced (parsing &, conversion APIs and JDBC are definitely fine examples of that). Experiments on a particular project have shown replacing all these equal instances by one of them can reduce the serialized size of some objects by half.
      Therefore, JBoss Serialization should provide way to allow users to tell it's ok to use the same reference for all these immutable instances and which classes are to be considered immutable and replace them during the writing phase. This would be much more efficient and wouldn't require developers to rewrite their code in order to optimize serialization of some objects. A global way, such as system property, of telling the API to do this by default with the most commonly used Java SE classes would be desirable as well.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                clebert.suconic Clebert Suconic
                Reporter:
                mister__m Michael Santos
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 2 days
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified